/**
 * Conure Cards - Modern UI Stylesheet
 * Shared styles for gamified, responsive design
 * To be included alongside Bootstrap 5
 */

/* CSS Variables - Brand Colors */
:root {
    --cc-forest: #269846;
    --cc-berry: #64315c;
    --cc-slate: #161a27;
    --cc-fuchsia: #2f9bd3;
    --cc-mint: #CCE4CB;
    --cc-gold: #FFD700;
    --cc-gold-dark: #FFA500;
    --cc-green-shadow: 0 10px 22px rgba(38, 152, 70, 0.28);
    --cc-green-shadow-hover: 0 14px 28px rgba(38, 152, 70, 0.36);
}

/* Modern Form Controls */
.form-control-modern {
    border: 2px solid #e6e8ef;
    border-radius: 12px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control-modern:focus {
    border-color: var(--cc-forest);
    box-shadow: 0 0 0 4px rgba(38, 152, 70, 0.1);
    outline: none;
}

/* Modern Buttons */
.btn-modern {
    border-radius: 12px;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.btn-primary-modern {
    background: linear-gradient(135deg, var(--cc-forest) 0%, #1e7e34 100%);
    color: #fff;
    border: none;
    box-shadow: var(--cc-green-shadow);
}

.btn-primary-modern:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--cc-green-shadow-hover);
    filter: brightness(1.05);
    color: #fff;
}

.btn-primary-modern:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modern Cards */
.card-modern {
    background: #fff;
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: none;
}

/* Modern Alerts */
.alert-modern {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
}

.alert-success {
    background: linear-gradient(135deg, rgba(38, 152, 70, 0.1) 0%, rgba(38, 152, 70, 0.05) 100%);
    color: var(--cc-forest);
    border-left: 4px solid var(--cc-forest);
}

.alert-error {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%);
    color: #dc3545;
    border-left: 4px solid #dc3545;
}

.alert-info {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(13, 110, 253, 0.05) 100%);
    color: #0d6efd;
    border-left: 4px solid #0d6efd;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.nav-notif-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
}

.nav-notif-link.dropdown-toggle::after {
    display: none;
}

.nav-notif-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #ff4d4f;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(22, 26, 39, 0.6);
}

.notif-menu {
    width: min(280px, calc(100vw - 24px));
    padding: 0.35rem 0;
    border-radius: 16px;
    max-height: none;
    overflow: visible;
}

.notif-menu .dropdown-header {
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
}

.notif-item {
    padding: 0.65rem 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.notif-item.text-muted {
    display: block;
    font-size: 0.85rem;
    color: #94a3b8;
}

.notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.notif-icon.is-alert {
    background: rgba(37, 99, 235, 0.15);
    color: #2563eb;
}

.notif-icon.is-admin {
    background: rgba(248, 113, 113, 0.18);
    color: #ef4444;
}

.notif-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.notif-title {
    font-size: 0.88rem;
    line-height: 1.3;
    color: #111827;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-title.is-read {
    color: #6b7280;
    font-weight: 600;
}

.notif-title.is-unread {
    color: #111827;
    font-weight: 700;
}

.notif-message {
    font-size: 0.8rem;
    line-height: 1.3;
    color: #475569;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-message.is-read {
    color: #94a3b8;
    font-weight: 500;
}

.notif-message.is-unread {
    color: #475569;
    font-weight: 600;
}

.notif-time {
    margin-top: 0.25rem;
    font-size: 0.72rem;
    color: #9ca3af;
}

.notif-footer {
    padding: 0 0.75rem 0.25rem;
}

.nav-link-logout {
    color: rgba(248, 250, 252, 0.85);
    font-size: 0.9rem;
}

.navbar-conure .container {
    align-items: center;
}

.nav-links {
    gap: 1.25rem;
    flex-wrap: nowrap;
}

.navbar-conure .nav-link {
    margin-right: 0;
    padding: 0.35rem 0;
    white-space: nowrap;
    font-weight: 600;
}

.nav-item-logout .nav-link-logout {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(248, 250, 252, 0.75);
}

.nav-link-help::after {
    margin-left: 0.3rem;
}

.nav-actions {
    gap: 0.75rem;
    flex-wrap: nowrap;
}

.nav-chip-row {
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.nav-help-menu {
    min-width: 180px;
}

.player-pill-slim.dropdown-toggle::after {
    display: none;
}

.navbar-toggler {
    border-radius: 12px;
    border-color: rgba(255, 255, 255, 0.55);
    padding: 0.5rem 0.65rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.user-menu .dropdown-item i {
    color: var(--cc-berry);
}

@media (max-width: 1200px) {
    .nav-links {
        gap: 1rem;
    }
}

@media (max-width: 1200px) and (min-width: 992px) {
    .nav-item-help {
        display: none;
    }
}

@media (max-width: 991px) {
    .nav-links {
        gap: 0.65rem;
    }

    .navbar-conure .nav-link {
        font-size: 0.95rem;
    }

    .nav-actions {
        width: 100%;
    }

    .nav-chip-row {
        width: 100%;
        justify-content: flex-start;
    }

    .has-bottom-nav .nav-actions-auth {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .nav-actions {
        gap: 0.5rem;
    }

    .nav-chip-row {
        flex-wrap: wrap;
    }
}

/* Hero Sections */
.hero-gradient {
    background: linear-gradient(135deg, var(--cc-berry) 0%, var(--cc-slate) 100%);
    min-height: 60vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Floating Orb Animations */
.hero-gradient::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(192, 251, 255, 0.15) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

.hero-gradient::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(100, 49, 92, 0.2) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(5deg);
    }
}

/* Benefit Items */
.benefit-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.benefit-item:last-child {
    margin-bottom: 0;
}

.benefit-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.benefit-icon.gold {
    background: linear-gradient(135deg, var(--cc-gold) 0%, var(--cc-gold-dark) 100%);
}

.benefit-icon.green {
    background: linear-gradient(135deg, var(--cc-forest) 0%, #1e7e34 100%);
    color: #fff;
}

.benefit-icon.berry {
    background: linear-gradient(135deg, var(--cc-fuchsia) 0%, var(--cc-berry) 100%);
    color: #fff;
}

/* Pop Animation */
@keyframes pop {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.animate-pop {
    animation: pop 0.6s ease-out;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.animate-bounce {
    animation: bounce 0.6s ease-in-out infinite alternate;
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.animate-pulse {
    animation: pulse 1.5s ease-out infinite;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .card-modern {
        padding: 2rem 1.5rem;
    }

    .btn-modern {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--cc-forest);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e7e34;
}

/* =============================================
   STREAK NOTIFICATION TOAST
   ============================================= */

.streak-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 12000;
    width: 320px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    border: 2px solid var(--cc-gold);
    animation: slideInRight 0.5s ease-out, pulse-border 2s ease-in-out infinite;
    overflow: hidden;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes pulse-border {
    0%, 100% {
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 0 0 0 rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 0 0 10px rgba(255, 215, 0, 0);
    }
}

.streak-toast-content {
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.streak-toast-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.streak-toast-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

.streak-toast-close i {
    font-size: 12px;
    color: #666;
}

.streak-animation-container {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
}

#streakLottie {
    width: 100%;
    height: 100%;
}

.streak-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--cc-forest);
    margin-bottom: 1rem;
}

.streak-points {
    background: linear-gradient(135deg, var(--cc-gold) 0%, var(--cc-gold-dark) 100%);
    color: #333;
    padding: 10px 20px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(255, 204, 51, 0.4);
    animation: pop 0.5s ease-out;
}

.streak-points .points-plus {
    font-size: 18px;
    font-weight: bold;
}

.streak-points .points-value {
    font-size: 24px;
    font-weight: bold;
}

.streak-points .points-label {
    font-size: 12px;
    font-weight: 600;
}

/* 7-Day Journey Tracker */
.streak-journey {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.journey-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.journey-days {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.journey-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.day-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.journey-day.completed .day-circle {
    background: var(--cc-forest);
    color: #fff;
}

.journey-day.completed .day-circle i {
    font-size: 14px;
}

.journey-day.current .day-circle {
    background: linear-gradient(135deg, var(--cc-gold) 0%, var(--cc-gold-dark) 100%);
    color: #333;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
    animation: pulse-current 1.5s ease-in-out infinite;
}

@keyframes pulse-current {
    0%, 100% { box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(255, 215, 0, 0.1); }
}

.journey-day.future .day-circle {
    background: #e9ecef;
    color: #999;
}

.day-pts {
    font-size: 9px;
}

.day-label {
    font-size: 9px;
    color: #999;
    font-weight: 500;
}

.journey-day.current .day-label {
    color: var(--cc-forest);
    font-weight: 700;
}

.journey-line {
    width: 12px;
    height: 2px;
    background: #e9ecef;
    flex-shrink: 0;
}

.journey-line.completed {
    background: var(--cc-forest);
}

.journey-hint {
    font-size: 0.7rem;
    color: #888;
    margin: 0.75rem 0 0 0;
}

.journey-hint i {
    color: var(--cc-forest);
}

.journey-hint.max {
    color: var(--cc-forest);
    font-weight: 600;
}

.journey-hint.max i {
    color: var(--cc-gold);
}

.streak-balance {
    font-size: 0.875rem;
    color: #999;
    margin: 0;
}

.streak-balance strong {
    color: var(--cc-forest);
}

.cc-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 -10px 30px rgba(15,23,42,0.18);
    padding: 0.4rem 0.85rem 0.6rem;
    z-index: 1030;
}

.cc-bottom-nav__grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.35rem;
}

.cc-bottom-nav__link {
    text-decoration: none;
    color: #0d0f16;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    font-weight: 600;
    font-size: 0.83rem;
    padding: 0.4rem 0.3rem;
    border-radius: 12px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.cc-bottom-nav__link i {
    font-size: 1.2rem;
}

.cc-bottom-nav__link:hover,
.cc-bottom-nav__link:focus {
    background: #f5f7fb;
    color: var(--cc-berry);
    transform: translateY(-1px);
}

.cc-bottom-nav__notif {
    position: relative;
    display: flex;
    align-items: stretch;
}

button.cc-bottom-nav__link {
    border: 0;
    background: transparent;
    width: 100%;
    padding: 0.4rem 0.3rem;
    font-family: inherit;
    cursor: pointer;
}

.cc-bottom-nav__link--notif {
    color: var(--cc-berry);
}

.cc-bottom-nav__icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cc-bottom-nav__link--notif .nav-notif-dot {
    top: -4px;
    right: -6px;
    box-shadow: 0 0 0 2px #fff;
}

.notif-menu-mobile {
    position: fixed;
    bottom: 72px;
    right: 12px;
    left: auto;
    transform: none;
    width: min(280px, calc(100vw - 24px));
}

@media (max-width: 767px) {
    body.has-bottom-nav {
        padding-bottom: 76px;
    }
}

/* Dashboard Streak Journey */
.streak-journey-dashboard {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.05) 0%, rgba(255, 215, 0, 0.05) 100%);
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid rgba(255, 107, 107, 0.15);
}

.streak-journey-dashboard .journey-days {
    justify-content: space-between;
}

.streak-journey-dashboard .day-label {
    font-size: 10px;
}

/* Streak Toast Mobile */
@media (max-width: 576px) {
    .streak-toast {
        top: 20px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: calc(100% - 20px);
    }

    .streak-animation-container {
        width: 80px;
        height: 80px;
    }

    .streak-title {
        font-size: 1.25rem;
    }

    .streak-points .points-value {
        font-size: 20px;
    }

    .day-circle {
        width: 28px;
        height: 28px;
    }

    .day-pts {
        font-size: 8px;
    }

    .journey-line {
        width: 8px;
    }
}

.footer-form-static {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer-form-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.footer-drop-cta .footer-form-row {
    background: transparent;
    border: 0;
    border-radius: 0 !important;
    padding: 0;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.footer-drop-cta .footer-form-input {
    padding: 0;
    min-width: 0;
}

.footer-drop-cta .footer-form-static {
    white-space: normal;
}

.footer-drop-cta .footer-form-btn {
    margin: 0;
}
