/**
 * Suno Music Generator — Frontend Styles
 *
 * Product page fields for AI music customisation.
 */

/* ============================================================
   Container
   ============================================================ */
.smg-product-fields {
    margin: 24px 0;
    padding: 28px;
    background: linear-gradient(135deg, #faf5ff 0%, #f0f0ff 100%);
    border: 1px solid #e9d5ff;
    border-radius: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
}

.smg-fields-header {
    text-align: center;
    margin-bottom: 24px;
}

.smg-music-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.smg-fields-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: #5b21b6;
    margin: 0 0 6px;
}

.smg-subtitle {
    font-size: 14px;
    color: #7c3aed;
    margin: 0;
}

/* ============================================================
   Field Groups
   ============================================================ */
.smg-field-group {
    margin-bottom: 20px;
    position: relative;
}

.smg-field-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.smg-required {
    color: #dc2626;
    margin-left: 2px;
}

.smg-optional {
    color: #9ca3af;
    font-weight: 400;
    font-size: 12px;
}

.smg-field-group select,
.smg-field-group input[type="text"],
.smg-field-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    color: #1f2937;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}

.smg-field-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.smg-field-group select:focus,
.smg-field-group input[type="text"]:focus,
.smg-field-group textarea:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.smg-field-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.smg-char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

/* ============================================================
   Toggle / Checkbox
   ============================================================ */
.smg-checkbox-group {
    margin-top: 8px;
}

.smg-toggle-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 12px;
}

.smg-toggle-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.smg-toggle-slider {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    background: #d1d5db;
    border-radius: 13px;
    transition: background 0.3s;
    flex-shrink: 0;
}

.smg-toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.smg-toggle-label input[type="checkbox"]:checked + .smg-toggle-slider {
    background: #7c3aed;
}

.smg-toggle-label input[type="checkbox"]:checked + .smg-toggle-slider::after {
    transform: translateX(22px);
}

.smg-toggle-text {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

/* ============================================================
   Footer Notice
   ============================================================ */
.smg-fields-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e9d5ff;
}

.smg-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.smg-notice .dashicons {
    color: #7c3aed;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 600px) {
    .smg-product-fields {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .smg-fields-header h3 {
        font-size: 18px;
    }

    .smg-field-group select,
    .smg-field-group input[type="text"],
    .smg-field-group textarea {
        font-size: 16px; /* Prevents zoom on mobile */
    }
}
