/* Custom Frame Designer - Main Styling */

/* ===== CONTAINER STYLING ===== */
.smashing-framesize {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-bottom: 2rem;
}

.product-info-main {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== FORM FIELD STYLING ===== */
.field {
    margin-bottom: 1.5rem;
    position: relative;
}

.field.width,
.field.height {
    display: inline-block;
    width: calc(50% - 1rem);
    margin-right: 1rem;
}

.field.width:last-child,
.field.height:last-child {
    margin-right: 0;
}

/* ===== LABEL STYLING ===== */
.label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== INPUT STYLING ===== */
.input-text,
.product-custom-option {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: #111827;
    background: #ffffff;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
}

.input-text:focus,
.product-custom-option:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.input-text:hover,
.product-custom-option:hover {
    border-color: #d1d5db;
}

/* ===== SELECT DROPDOWN STYLING ===== */
select.product-custom-option {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* ===== TEXTAREA STYLING ===== */
textarea.product-custom-option {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

/* ===== CONTROL CONTAINER ===== */
.control {
    position: relative;
}

/* ===== NOTE/HELP TEXT ===== */
.note {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.5rem;
    font-style: italic;
}

/* ===== CHARACTER COUNTER ===== */
.character-counter {
    font-weight: 600;
    color: #3b82f6;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .field.width,
    .field.height {
        width: 100%;
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .smashing-framesize {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.field {
    animation: fadeInUp 0.3s ease-out;
}

/* ===== ACCESSIBILITY ===== */
.input-text:focus-visible,
.product-custom-option:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* ===== ERROR STATES ===== */
.field.error .input-text,
.field.error .product-custom-option {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.field.error .label {
    color: #ef4444;
}

/* ===== SUCCESS STATES ===== */
.field.success .input-text,
.field.success .product-custom-option {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* ===== LOADING STATES ===== */
.field.loading .input-text,
.field.loading .product-custom-option {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 11-6.219-8.56'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
