/* =============================================
   MUSEiT Sender Styles
   Requires: base.css
   ============================================= */

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(12, 97, 112, 0.22);
    border-radius: 50px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    font-family: 'Manrope', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.10);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .theme-toggle {
    background: rgba(7, 18, 20, 0.72);
    border-color: rgba(164, 229, 224, 0.20);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.theme-toggle:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--mint) 100%);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.0);
}

/* ===== FORM STEPS ===== */
.step {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

[data-theme="dark"] .step {
    background: rgba(7, 18, 20, 0.72);
    border-color: rgba(164, 229, 224, 0.14);
}

.step-header {
    display: grid;
    grid-template-columns: 32px 1fr;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 6px;
    align-items: start;
    margin-bottom: 20px;
}

.step-number {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--mint) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    align-self: start;
}

.step-title {
    grid-column: 2;
    grid-row: 1;
    font-family: 'Poppins', 'Manrope', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.step-header .subtitle {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    text-align: left;
}

/* Solo header (no step number) */
.step-header.step-header--solo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.step-header.step-header--solo .step-title {
    width: 100%;
    text-align: center;
}

/* ===== VOICE RECORDER ===== */
.recorder {
    text-align: center;
    background: rgba(164, 229, 224, 0.18);
    border: 1px solid rgba(12, 97, 112, 0.18);
    border-radius: 12px;
    padding: 28px 20px;
}

[data-theme="dark"] .recorder {
    background: rgba(55, 190, 176, 0.10);
    border-color: rgba(164, 229, 224, 0.18);
}

.record-button {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(120% 120% at 30% 20%, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 45%),
                linear-gradient(135deg, var(--primary) 0%, var(--mint) 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    transition: all 0.3s ease;
    color: #fff;
    font-size: 38px;
    box-shadow: 0 18px 44px rgba(12, 97, 112, 0.30);
}

.record-button:hover {
    transform: scale(1.05);
    box-shadow: 0 22px 60px rgba(12, 97, 112, 0.38);
}

.record-button.recording {
    background: var(--error);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 0 18px rgba(239, 68, 68, 0); }
}

.recording-status {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.audio-player {
    width: 100%;
    margin-top: 16px;
    border-radius: 8px;
}

/* ===== SEARCH & SONGS ===== */
.search-box-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.search-box {
    width: 100%;
    padding: 14px 44px 14px 18px;
    border: 2px solid rgba(12, 97, 112, 0.18);
    border-radius: 14px;
    font-size: 15px;
    font-family: 'Manrope', sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: all 0.3s ease;
}

[data-theme="dark"] .search-box {
    border-color: rgba(164, 229, 224, 0.16);
}

.search-box::placeholder { 
    color: var(--text-secondary); 
}

.search-box:focus {
    outline: none;
    border-color: var(--mint);
    box-shadow: 0 0 0 4px var(--ring);
}

.search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.song-results {
    max-height: 360px;
    overflow-y: auto;
    margin-top: 12px;
}

.song-item {
    display: flex;
    align-items: center;
    padding: 14px;
    border: 2px solid rgba(12, 97, 112, 0.14);
    border-radius: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .song-item {
    border-color: rgba(164, 229, 224, 0.12);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
}

.song-item:hover {
    border-color: var(--mint);
    transform: translateX(4px);
}

.song-item.selected {
    border-color: var(--primary);
    background: rgba(219, 245, 240, 0.55);
}

[data-theme="dark"] .song-item.selected {
    background: rgba(55, 190, 176, 0.12);
}

.song-thumbnail {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 14px;
    flex-shrink: 0;
}

.song-info { 
    flex: 1; 
    min-width: 0; 
}

.song-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.song-artist {
    font-size: 13px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.song-check {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--mint) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    margin-left: auto;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(12, 97, 112, 0.3);
}

.song-check.hidden {
    display: none;
}

/* ===== FORM INPUTS ===== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 8px;
}

.input-field {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(12, 97, 112, 0.18);
    border-radius: 14px;
    font-size: 15px;
    font-family: 'Manrope', sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: all 0.3s ease;
}

[data-theme="dark"] .input-field {
    border-color: rgba(164, 229, 224, 0.16);
}

.input-field::placeholder { 
    color: var(--text-secondary); 
}

.input-field:focus {
    outline: none;
    border-color: var(--mint);
    box-shadow: 0 0 0 4px var(--ring);
}

/* ===== ERROR MESSAGE ===== */
.error-message {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--error);
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    display: none;
}

.error-message.visible { 
    display: block; 
}

/* ===== SECTIONS ===== */
.share-section {
    display: none;
    padding: 12px 0;
}

.share-section.active { 
    display: block; 
}

/* ===== CHARITY CARDS ===== */
.charity-card {
    background: var(--bg);
    border: 2px solid rgba(12, 97, 112, 0.14);
    border-radius: 14px;
    padding: 22px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .charity-card {
    border-color: rgba(164, 229, 224, 0.12);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
}

.charity-card:hover {
    border-color: var(--mint);
    transform: translateY(-2px);
}

.charity-card.selected {
    border-color: var(--primary);
    background: rgba(219, 245, 240, 0.55);
}

[data-theme="dark"] .charity-card.selected {
    background: rgba(55, 190, 176, 0.12);
}

.charity-card-icon {
    width: 72px;
    height: 72px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px auto;
    font-weight: 700;
    font-size: 20px;
    overflow: hidden;
}

.charity-card-icon.has-logo {
    background: #ffffff !important;
    border-radius: 12px;
    padding: 8px;
    width: 80px;
    height: 80px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.charity-card-icon.has-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.charity-card-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
    line-height: 1.4;
}

.charity-card-check {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--mint) 100%);
    color: white;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.charity-card.selected .charity-card-check {
    display: flex;
}

/* ===== CHARITY EXPLAINER ===== */
.charity-explainer {
    background: rgba(164, 229, 224, 0.18);
    border-left: 4px solid var(--primary);
    padding: 18px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

[data-theme="dark"] .charity-explainer {
    background: rgba(55, 190, 176, 0.10);
    border-left-color: var(--tiffany);
}

.charity-explainer-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--primary);
    margin-bottom: 6px;
}

[data-theme="dark"] .charity-explainer-title {
    color: var(--tiffany);
}

.charity-explainer-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== PAYMENT SECTION ===== */
.payment-content {
    text-align: center;
    padding: 20px 0;
}

.payment-content h2 {
    font-family: 'Poppins', 'Manrope', sans-serif;
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 22px;
    letter-spacing: -0.6px;
}

.payment-content .payment-amount {
    font-size: 15px;
    color: var(--text);
    margin-bottom: 16px;
}

.payment-content .payment-info {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.payment-content .payment-charity {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 14px;
}

/* ===== SUCCESS SCREEN ===== */
.success-icon {
    width: 72px;
    height: 72px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
}

.success-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.success-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ===== SHARE LINK ===== */
.share-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.share-link-display {
    flex: 1;
    background: var(--surface);
    border: 2px solid var(--border);
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    color: var(--primary);
    word-break: break-all;
    text-align: left;
    overflow: hidden;
    font-weight: 500;
}

.copy-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--mint) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: 'Manrope', sans-serif;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    filter: brightness(1.03);
}

/* ===== SHARE BUTTONS ===== */
.share-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    font-family: 'Manrope', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn:hover {
    border-color: var(--primary);
    background: rgba(86, 31, 108, 0.05);
    transform: translateY(-2px);
}

.share-btn.whatsapp { border-color: #25D366; color: #25D366; }
.share-btn.whatsapp:hover { background: #25D366; color: #fff; }

.share-btn.sms { border-color: #34C759; color: #34C759; }
.share-btn.sms:hover { background: #34C759; color: #fff; }

.share-btn.email { border-color: #5856D6; color: #5856D6; }
.share-btn.email:hover { background: #5856D6; color: #fff; }

.share-btn.more { border-color: var(--primary); color: var(--primary); }
.share-btn.more:hover { background: var(--primary); color: #fff; }

/* ===== SECONDARY BUTTON (Create Another) ===== */
#createAnotherButton {
    background: linear-gradient(135deg, rgba(119, 68, 34, 1) 0%, rgba(119, 68, 34, 0.85) 100%) !important;
    box-shadow: 0 14px 34px rgba(119, 68, 34, 0.22) !important;
}

#createAnotherButton:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(119, 68, 34, 0.28) !important;
}

/* ===== MOBILE ===== */
@media (max-width: 640px) {
    .theme-toggle { 
        top: 12px; 
        right: 12px; 
        padding: 6px 12px; 
        font-size: 13px; 
    }
    
    .step { 
        padding: 22px 18px; 
    }
    
    .step-title { 
        font-size: 16px; 
    }
    
    .share-buttons-grid { 
        grid-template-columns: 1fr; 
    }
    
    #charityGrid { 
        grid-template-columns: 1fr !important; 
    }
    
    .success-title { 
        font-size: 22px; 
    }
    
    .record-button { 
        width: 88px; 
        height: 88px; 
        font-size: 34px; 
    }
}
