/**
 * Klokke Takst Plugin Styles
 */

.klokke-takst-purchase,
.klokke-takst-form-wrapper {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.klokke-takst-purchase h2,
.klokke-takst-form-wrapper h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
}

.takst-product-info {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
}

.takst-product-info h3 {
    margin-top: 0;
}

.takst-product-info .price {
    font-size: 24px;
    color: #2c5f2d;
    margin: 15px 0;
}

#klokke-takst-form .form-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 25px;
    border-left: 4px solid #4a90e2;
}

#klokke-takst-form .form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

#klokke-takst-form .form-row {
    margin-bottom: 20px;
}

#klokke-takst-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #555;
}

#klokke-takst-form input[type="text"],
#klokke-takst-form input[type="email"],
#klokke-takst-form select,
#klokke-takst-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

#klokke-takst-form input[type="text"]:focus,
#klokke-takst-form input[type="email"]:focus,
#klokke-takst-form select:focus,
#klokke-takst-form textarea:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

#klokke-takst-form input[type="file"] {
    padding: 10px 0;
}

#klokke-takst-form small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

#image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

#image-preview img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid #ddd;
}

.button {
    background: #333;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.button:hover {
    background: #555;
}

.button.alt {
    background: #4a90e2;
}

.button.alt:hover {
    background: #357abd;
}

.button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#takst-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    display: none;
}

#takst-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#takst-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#takst-result {
    background: #f0f8ff;
    padding: 30px;
    border-radius: 8px;
    margin-top: 30px;
    border: 2px solid #4a90e2;
}

#takst-result h3 {
    color: #2c5f2d;
    margin-top: 0;
}

#download-section {
    margin: 20px 0;
}

#download-section a {
    display: inline-block;
    background: #2c5f2d;
    color: #fff;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

#download-section a:hover {
    background: #1f4420;
}

#purchase-request-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #ddd;
}

#purchase-request-section h4 {
    color: #333;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .klokke-takst-purchase,
    .klokke-takst-form-wrapper {
        padding: 20px;
        margin: 15px;
    }

    #image-preview img {
        width: 80px;
        height: 80px;
    }
}
