/* Stats Styles - Prominent stats baked into flows */

/* ========================================
   Hide header stats (show stats in flows instead)
   ======================================== */
.header-stats .header-stat {
    display: none !important;
}

/* Keep the CTA button visible */
.header-stats .btn {
    display: inline-flex !important;
}

/* Hide old masthead on dashboard (replaced by new stats card) */
.masthead {
    display: none !important;
}

/* Show user name on desktop in header dropdown */
@media (min-width: 768px) {
    .user-name-desktop {
        display: inline !important;
    }
}

/* ========================================
   Stats Card (message page - after clicking smile)
   ======================================== */
.stats-card {
    background: white;
    border-radius: var(--radius-3xl);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.stats-card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    text-align: center;
}

.stats-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .stats-card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stats-card-item {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(to bottom right, var(--orange-50), var(--pink-50));
    border-radius: var(--radius-2xl);
    position: relative;
    overflow: hidden;
}

.stats-card-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--orange-400), var(--pink-500));
}

.stats-card-label {
    font-family: 'Lora', serif;
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.stats-card-number {
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(to right, var(--orange-600), var(--pink-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.stats-card-subtitle {
    font-family: 'Lora', serif;
    font-size: 0.75rem;
    color: var(--gray-500);
    font-style: italic;
}

/* ========================================
   Dashboard Stats Card - Matching React Prototype
   ======================================== */
.dashboard-stats {
    background: white;
    border-radius: var(--radius-3xl);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.dashboard-stats-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

@media (min-width: 768px) {
    .dashboard-stats-header {
        padding: 2.5rem;
    }
}

.dashboard-stats-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.875rem;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .dashboard-stats-avatar {
        width: 4rem;
        height: 4rem;
        font-size: 2.25rem;
    }
}

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

.dashboard-stats-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 0.5rem 0;
    line-height: 1;
}

@media (min-width: 768px) {
    .dashboard-stats-name {
        font-size: 2.25rem;
    }
}

.dashboard-stats-email {
    font-family: 'Lora', serif;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .dashboard-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.dashboard-stat {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    position: relative;
    display: flex;
    flex-direction: row; /* Side by side on mobile */
    justify-content: space-between;
    align-items: center;
}

@media (min-width: 768px) {
    .dashboard-stat {
        display: block; /* Stacked on desktop */
    }
}

@media (min-width: 768px) {
    .dashboard-stat {
        padding: 2rem;
        border-bottom: none;
        border-right: 1px solid var(--gray-100);
    }

    .dashboard-stat:last-child {
        border-right: none;
    }
}

.dashboard-stat.clickable {
    cursor: pointer;
    transition: background-color 0.2s;
}

.dashboard-stat.clickable:hover {
    background-color: var(--gray-50);
}

.dashboard-stat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0; /* No margin on mobile since side-by-side */
}

@media (min-width: 768px) {
    .dashboard-stat-header {
        margin-bottom: 1rem; /* Restore margin on desktop */
    }
}

.dashboard-stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dashboard-stat:nth-child(1) .dashboard-stat-icon {
    background: linear-gradient(to bottom right, var(--orange-400), var(--pink-500));
}

.dashboard-stat:nth-child(2) .dashboard-stat-icon {
    background: linear-gradient(to bottom right, #34d399, #10b981);
}

.dashboard-stat:nth-child(3) .dashboard-stat-icon {
    background: linear-gradient(to bottom right, #60a5fa, #6366f1);
}

.dashboard-stat-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    color: white;
    stroke: white;
}

.dashboard-stat-label {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.4;
}

@media (min-width: 768px) {
    .dashboard-stat-label {
        font-size: 1.125rem;
    }
}

.dashboard-stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
    .dashboard-stat-number {
        font-size: 3rem;
    }
}

.dashboard-stat:nth-child(1) .dashboard-stat-number {
    background: linear-gradient(to right, var(--orange-600), var(--pink-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-stat:nth-child(2) .dashboard-stat-number {
    background: linear-gradient(to right, #059669, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-stat:nth-child(3) .dashboard-stat-number {
    background: linear-gradient(to right, #2563eb, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-stat-subtitle {
    font-family: 'Lora', serif;
    font-size: 0.75rem;
    color: var(--gray-500);
    font-style: italic;
}

.dashboard-stat-sparkle {
    display: none;
}

.dashboard-stats-url {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Lora', serif;
    font-size: 0.875rem;
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1rem;
}

.dashboard-stats-url:hover {
    background: var(--gray-200);
}

/* ========================================
   Counter Animations
   ======================================== */
@keyframes countUp {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    50% {
        transform: translateY(-5px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.counter-animate {
    animation: countUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes celebrate {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    25% {
        transform: scale(1.03);
        filter: brightness(1.1);
    }
    50% {
        transform: scale(1.05);
        filter: brightness(1.15);
    }
    75% {
        transform: scale(1.03);
        filter: brightness(1.1);
    }
}

.celebrate-stat {
    animation: celebrate 1s ease-out;
}

@keyframes numberPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); color: var(--orange-500); }
    100% { transform: scale(1); }
}

.number-pop {
    animation: numberPop 0.4s ease-out;
}

/* ========================================
   Message Compose Card - New Design
   ======================================== */
.compose-card {
    background: white;
    border-radius: var(--radius-3xl);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
    .compose-card {
        padding: 3rem;
    }
}

.compose-recipient-bubble {
    display: inline-flex;
    flex-direction: column;
    gap: 0.75rem;
    background: linear-gradient(to right, var(--orange-100), var(--pink-100));
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    min-width: 280px;
}

@media (min-width: 768px) {
    .compose-recipient-bubble {
        min-width: 320px;
    }
}

.compose-input {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--orange-200);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-family: 'Lora', serif;
    font-size: 0.875rem;
    color: var(--orange-900);
    outline: none;
    transition: border-color 0.2s;
}

.compose-input:first-child {
    font-weight: 600;
}

.compose-input::placeholder {
    color: var(--gray-400);
}

.compose-input:focus {
    border-color: var(--orange-400);
}

.compose-message-area {
    display: flex;
    flex-direction: column; /* Stacked on mobile */
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.compose-emoji {
    display: none; /* Hidden on mobile */
    font-size: 2.5rem;
    flex-shrink: 0;
    line-height: 1;
}

@media (min-width: 768px) {
    .compose-message-area {
        flex-direction: row; /* Side-by-side on desktop */
        gap: 1rem;
    }

    .compose-emoji {
        display: block; /* Show on desktop */
        font-size: 3.5rem;
    }
}

.compose-textarea {
    width: 100%; /* Full width on mobile */
    font-family: 'Lora', serif;
    font-size: 1.5rem;
    line-height: 1.4;
    color: var(--gray-900);
    border: none;
    outline: none;
    resize: none;
    min-height: 120px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .compose-textarea {
        width: auto; /* Let flex handle it on desktop */
        flex: 1;
        font-size: 2rem;
        line-height: 1.5;
    }
}

.compose-textarea::placeholder {
    color: var(--gray-400);
}

.compose-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .compose-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.compose-ideas-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Center text when button spans full width */
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--orange-600);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.compose-ideas-btn:hover {
    color: var(--pink-600);
    background: var(--orange-50);
}

.compose-ideas-btn:hover svg {
    stroke: var(--pink-600);
}

.compose-ideas-btn svg {
    flex-shrink: 0;
}

.compose-send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(to right, var(--orange-500), var(--pink-500));
    border: none;
    border-radius: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.compose-send-btn:hover {
    background: linear-gradient(to right, var(--orange-600), var(--pink-600));
    transform: translateY(-1px);
}

.compose-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.compose-send-btn svg {
    flex-shrink: 0;
}

/* ========================================
   Traits Modal Grid
   ======================================== */
.traits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.trait-btn {
    padding: 0.75rem 1rem;
    font-family: 'Lora', serif;
    font-size: 1rem;
    color: var(--gray-700);
    background: var(--gray-100);
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.trait-btn:hover {
    background: linear-gradient(to right, var(--orange-100), var(--pink-100));
    color: var(--gray-900);
}

/* ========================================
   Toast Notification
   ======================================== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(to right, #10b981, #059669);
    color: white;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
}

.toast.hidden {
    display: none;
}

.toast-icon {
    width: 2rem;
    height: 2rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ========================================
   Pass It Along Heading (Message Page)
   ======================================== */
.pass-it-along-heading {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .pass-it-along-heading {
        font-size: 1.75rem;
    }
}
