/* Base CSS - Common styles shared across all devices */

/* Custom Button Styles */
.btn-join-login, .btn-action {
    background-color: #38bdf8 !important; /* blue */
    color: #fff !important;
    border: none;
}

.btn-join-login:hover, .btn-join-login:focus,
.btn-action:hover, .btn-action:focus {
    background-color: #0ea5e9 !important;
    color: #fff !important;
}

.btn-content {
    background-color: #22c55e !important;
    color: #fff !important;
    border: none;
}

.btn-content:hover, .btn-content:focus {
    background-color: #16a34a !important;
    color: #fff !important;
}

.btn-practice-link {
    background-color: transparent !important;
    color: #6b7280 !important; /* gray-500 */
    border: 1px solid #d1d5db !important; /* gray-300 border */
}

.btn-practice-link:hover, .btn-practice-link:focus {
    background-color: #f9fafb !important; /* gray-50 */
    color: #374151 !important; /* gray-700 */
    border-color: #9ca3af !important; /* gray-400 */
}

/* Subtle background for outline buttons - similar to navigation buttons */
.btn-outline-primary {
    background-color: rgba(13, 110, 253, 0.05) !important; /* Very light blue background */
    border: none !important;
    color: #0d6efd !important;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: rgba(13, 110, 253, 0.15) !important; /* Slightly darker blue on hover */
    color: #0d6efd !important;
}

.btn-outline-danger {
    background-color: rgba(220, 53, 69, 0.05) !important; /* Very light red background */
    border: none !important;
    color: #dc3545 !important;
}

.btn-outline-danger:hover, .btn-outline-danger:focus {
    background-color: rgba(220, 53, 69, 0.15) !important; /* Slightly darker red on hover */
    color: #dc3545 !important;
}

.btn-outline-success {
    background-color: rgba(25, 135, 84, 0.05) !important; /* Very light green background */
    border: none !important;
    color: #198754 !important;
}

.btn-outline-success:hover, .btn-outline-success:focus {
    background-color: rgba(25, 135, 84, 0.15) !important; /* Slightly darker green on hover */
    color: #198754 !important;
}

.btn-outline-info {
    background-color: rgba(13, 202, 240, 0.05) !important; /* Very light cyan background */
    border: none !important;
    color: #0dcaf0 !important;
}

.btn-outline-info:hover, .btn-outline-info:focus {
    background-color: rgba(13, 202, 240, 0.15) !important; /* Slightly darker cyan on hover */
    color: #0dcaf0 !important;
}

.btn-outline-secondary {
    background-color: rgba(108, 117, 125, 0.05) !important; /* Very light gray background */
    border: none !important;
    color: #6c757d !important;
}

.btn-outline-secondary:hover, .btn-outline-secondary:focus {
    background-color: rgba(108, 117, 125, 0.15) !important; /* Slightly darker gray on hover */
    color: #6c757d !important;
}

/* Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Common utilities */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Accessible focus styles */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.25);
    border-color: #38bdf8;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Card hover effects */
.card-hover {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Message container styles */
.message-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1060;
    pointer-events: none;
}

.toast-message {
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(100%);
    position: relative;
}

.message-text {
    font-size: 0.9em;
    line-height: 1.4;
}

.message-close-btn {
    font-size: 0.7em;
}

/* Button helper classes for responsive design */
.btn-responsive {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-responsive .btn-icon {
    flex-shrink: 0;
}

.btn-responsive .btn-text {
    white-space: nowrap;
}

/* Logo styles - shared across all devices */
.logo-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-text {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 2.2rem;
    font-weight: 600;
    font-style: italic;
    color: #2a4365;
    letter-spacing: 0.5px;
    line-height: 1;
    transform: skewX(-8deg);
    margin-bottom: 2px;
}

.logo-grok {
    color: #22c55e;
    font-weight: 700;
}

.logo-tagline {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    letter-spacing: 0.3px;
    margin-left: 2px;
}

/* Purchase Button in Navigation - Subtle pulse effect */
.purchase-btn-nav {
    animation: subtle-pulse 3s ease-in-out infinite;
}

.purchase-btn-nav:hover {
    animation: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(25, 135, 84, 0.2) !important;
}

@keyframes subtle-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.2);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.1);
    }
}
/* Enhanced Purchase Button (Curriculum Detail) - Shimmer + Glow effects */
.purchase-cta-btn {
    background: linear-gradient(
        90deg,
        rgba(25, 135, 84, 0.05) 0%,
        rgba(25, 135, 84, 0.15) 25%,
        rgba(25, 135, 84, 0.25) 50%,
        rgba(25, 135, 84, 0.15) 75%,
        rgba(25, 135, 84, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite, glow-pulse 2s ease-in-out infinite;
}

.purchase-cta-btn:hover {
    animation: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(25, 135, 84, 0.3) !important;
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(25, 135, 84, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(25, 135, 84, 0.5);
    }
}

/* Learning Streak Day Boxes */
.streak-day-wrapper {
    width: 28px;
    height: 28px;
    display: inline-block;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.streak-day-wrapper:hover {
    transform: scale(1.2);
}

.streak-circle {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg); /* Start from top */
}

.streak-circle-bg {
    opacity: 0.3;
}

.streak-circle-progress {
    transition: stroke-dasharray 0.3s ease, stroke 0.3s ease;
}

/* Add a subtle glow effect for completed days */
.streak-day-wrapper:has(.streak-circle-progress[stroke-dasharray*="100"]) .streak-circle-progress {
    filter: drop-shadow(0 0 3px currentColor);
}
