/* ==========================================
   COMPONENTS
   Buttons, Cards, Modals, Forms, Dropdowns, User Menus
   ========================================== */

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--accent-yellow);
    color: var(--primary-blue);
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn:hover {
    background-color: #e6ac00;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: var(--accent-yellow);
    color: var(--primary-blue);
}

.btn-primary:hover {
    background: #ffb300;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-blue);
}

.btn-secondary:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background: white;
    color: var(--primary-blue);
    transform: translateY(-2px);
}

/* Sign In Button */
.sign-in-btn {
    background-color: var(--accent-yellow);
    color: var(--primary-blue);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
}

.sign-in-btn:hover {
    background-color: #e6ac00;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-bottom: none;
}

.sign-in-btn i {
    font-size: 1rem;
}

/* Dropdown Menu Styles */
nav ul li.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
}

.dropdown-toggle i {
    font-size: 0.7rem;
    transition: transform 0.3s;
    margin-left: 0.2rem;
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--primary-blue);
    min-width: 220px;
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: all 0.3s ease;
    list-style: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.dropdown:hover .dropdown-menu {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
}

.dropdown-menu li {
    margin: 0;
    width: 100%;
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 0;
    border: none;
    width: 100%;
    box-sizing: border-box;
}

.dropdown-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--accent-yellow);
    padding-left: 1.5rem;
    border-bottom: none;
}

.dropdown-menu li a.active {
    background-color: var(--accent-yellow);
    color: var(--primary-blue);
    font-weight: 600;
}

.dropdown-menu li a i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    color: var(--accent-yellow);
    flex-shrink: 0;
}

/* User Menu (Signed In) */
.user-menu {
    position: relative;
}

.user-name-btn {
    background-color: var(--accent-yellow);
    color: var(--primary-blue);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
}

.user-name-btn img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.user-name-btn:hover {
    background-color: #e6ac00;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-bottom: none;
}

.user-name-btn i.fa-chevron-down {
    font-size: 0.75rem;
    transition: transform 0.3s;
}

.user-menu.active .user-name-btn i.fa-chevron-down {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-menu.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s;
    border-bottom: 1px solid #f3f4f6;
}

.user-dropdown a:last-child {
    border-bottom: none;
}

.user-dropdown a:hover {
    background: #f9fafb;
    color: var(--primary-blue);
}

.user-dropdown a i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* Sign In Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #ffffff;
    margin: auto;
    padding: 2.5rem;
    border-radius: 16px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.3s ease;
}

.close-modal {
    position: absolute;
    right: 1.25rem;
    top: 1.25rem;
    color: #9ca3af;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover,
.close-modal:focus {
    color: #111827;
    background-color: #f3f4f6;
}

.modal-content h2 {
    margin: 0 0 2rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.02em;
    text-align: center;
}

/* Google Sign In Button */
.google-signin-btn {
    width: 100%;
    padding: 0.9rem 1.25rem;
    background-color: #ffffff;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #3c4043;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.google-signin-btn:hover {
    background-color: #f8f9fa;
    border-color: #c0c0c0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.google-signin-btn:active {
    background-color: #f1f3f4;
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.google-signin-btn svg {
    flex-shrink: 0;
}

/* Divider */
.divider {
    margin: 1.75rem 0;
    text-align: center;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e5e7eb;
}

.divider span {
    position: relative;
    background: #ffffff;
    padding: 0 1rem;
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Sign In Form */
.signin-form {
    margin-bottom: 0;
}

.signin-form input {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 0.85rem;
    transition: all 0.25s ease;
    background-color: #fafafa;
    color: #111827;
}

.signin-form input::placeholder {
    color: #9ca3af;
}

.signin-form input:hover {
    border-color: #d0d0d0;
    background-color: #ffffff;
}

.signin-form input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(10, 36, 99, 0.08);
}

.signin-submit-btn {
    width: 100%;
    padding: 0.95rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 0.75rem;
    box-shadow: 0 4px 12px rgba(10, 36, 99, 0.2);
    letter-spacing: 0.02em;
}

.signin-submit-btn:hover {
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    box-shadow: 0 6px 20px rgba(10, 36, 99, 0.3);
    transform: translateY(-2px);
}

.signin-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(10, 36, 99, 0.2);
}

/* Redirect Loading Overlay */
.redirect-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.redirect-content {
    text-align: center;
}

.redirect-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 0.8s linear infinite;
}

.redirect-text {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
}

/* Form Groups */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-blue);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}
