/* Digital ID Application Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: #2563eb;
    color: white;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: nowrap;
    gap: 1rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 1rem;
}

.logo-image {
    height: 80px;
    width: auto;
    max-width: 400px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    white-space: nowrap;
}

.logo:hover {
    opacity: 0.9;
}

.logo:hover .logo-image {
    opacity: 0.9;
}

.mobile-menu-toggle {
    display: none !important;
    visibility: hidden !important;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.mobile-menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 1;
    min-width: 0;
}

.nav-links > a,
.nav-links > .nav-dropdown > .nav-dropdown-toggle {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s;
    padding: 0.5rem 0.625rem;
    border-radius: 0;
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-links > a:hover,
.nav-links > .nav-dropdown > .nav-dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.nav-links > a.active,
.nav-links > .nav-dropdown > .nav-dropdown-toggle.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    user-select: none;
}

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

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

.nav-dropdown-menu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: 0.25rem;
    border: 1px solid #e5e7eb;
    pointer-events: none;
}

.nav-dropdown.active .nav-dropdown-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto;
}

.nav-dropdown-menu a {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    color: #1f2937 !important;
    padding: 0.75rem 1rem;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f3f4f6;
    white-space: nowrap;
    background-color: transparent !important;
    transform: none !important;
    font-weight: 500 !important;
}

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

.nav-dropdown-menu a:hover {
    background-color: #f9fafb;
    transform: none;
}

.nav-dropdown-menu a.active {
    background-color: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

.nav-dropdown-menu a i {
    width: 1rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

.nav-dropdown-menu a.active i {
    color: #2563eb;
}

.nav-badge {
    background: #ef4444;
    color: white;
    border-radius: 0;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    margin-left: auto;
    font-weight: 600;
}

/* Mobile: Show dropdown menu as expanded list - MUST be before desktop media query */
@media (max-width: 968px) {
    .nav-dropdown {
        width: 100%;
    }
    
    .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }
    
    .nav-dropdown-menu {
        position: static !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        box-shadow: none !important;
        border: none !important;
        background-color: rgba(255, 255, 255, 0.1) !important;
        margin-top: 0 !important;
        padding-left: 1rem !important;
        top: auto !important;
        left: auto !important;
    }
    
    .nav-dropdown-menu a {
        color: white !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        background-color: transparent !important;
    }
    
    .nav-dropdown-menu a:hover {
        background-color: rgba(255, 255, 255, 0.1) !important;
    }
    
    .nav-dropdown-menu a.active {
        background-color: rgba(255, 255, 255, 0.2) !important;
        color: white !important;
    }
    
    .nav-dropdown-menu a i {
        color: rgba(255, 255, 255, 0.8) !important;
    }
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Cards */
.card {
    background: white;
    border-radius: 0;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #06b6d4;
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: #0891b2;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-secondary {
    background-color: #2563eb;
    color: white;
}

.btn-secondary:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-danger {
    background-color: #dc2626;
    color: white;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

/* ID Card */
.id-card {
    background-color: #ffffff;
    color: #1f2937;
    border: 2px solid #e5e7eb;
    border-radius: 0;
    padding: 2rem;
    max-width: 400px;
    margin: 3rem auto 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.id-card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.id-card-photo {
    width: 180px;
    height: 180px;
    border-radius: 0;
    border: 3px solid #e5e7eb;
    margin: 0 auto 1rem;
    object-fit: cover;
    display: block;
}

.id-card-details {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    border-radius: 0;
    margin-bottom: 1.5rem;
}

.id-card-details p {
    margin: 0.5rem 0;
}

.id-card-qr {
    text-align: center;
    margin-top: 1.5rem;
}

.id-card-qr img {
    max-width: 200px;
    background: white;
    padding: 1rem;
    border-radius: 0;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-info {
    background-color: #f0f9ff;
    color: #0e7490;
    border: 1px solid #67e8f9;
}

/* Footer */
footer {
    background-color: #1f2937;
    color: #d1d5db;
    padding: 4rem 0 2rem;
    margin-top: 0;
}

footer .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

/* Bottom section with Install App and Staff Service side by side */
.footer-bottom-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #374151;
}

@media (min-width: 968px) {
    .footer-bottom-section {
        grid-template-columns: 1fr 2fr;
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
}

.footer-section h3 {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-logo {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: white;
}

.footer-logo-image {
    height: 80px;
    width: auto;
    max-width: 400px;
    object-fit: contain;
}

.footer-logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    white-space: nowrap;
}

.footer-logo:hover {
    opacity: 0.9;
}

.footer-logo:hover .footer-logo-image {
    opacity: 0.9;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 0;
    background: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    transition: all 0.2s;
}

.footer-social a:hover {
    background-color: #06b6d4;
    color: white;
}

/* Responsive */
@media (min-width: 969px) {
    .mobile-menu-toggle {
        display: none !important;
        visibility: hidden !important;
    }
    
    .nav-links {
        display: flex !important;
        visibility: visible !important;
    }
    
    .nav-links.active {
        display: flex !important;
    }
    
    /* Ensure dropdown menu is hidden by default on desktop - must override mobile styles */
    .nav-dropdown-menu {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        pointer-events: none !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
        border: 1px solid #e5e7eb !important;
        background-color: white !important;
        margin-top: 0.25rem !important;
        padding-left: 0 !important;
    }
    
    .nav-dropdown.active .nav-dropdown-menu {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    
    /* Ensure dropdown menu items are styled correctly on desktop */
    .nav-dropdown-menu a {
        color: #1f2937 !important;
        border-bottom: 1px solid #f3f4f6 !important;
        background-color: transparent !important;
    }
    
    .nav-dropdown-menu a:hover {
        background-color: #f9fafb !important;
    }
    
    .nav-dropdown-menu a.active {
        background-color: #eff6ff !important;
        color: #2563eb !important;
    }
}

@media (max-width: 1200px) and (min-width: 969px) {
    .nav-links {
        gap: 1rem;
    }
    
    .nav-links a {
        font-size: 0.9375rem;
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 968px) {
    .mobile-menu-toggle {
        display: block !important;
        visibility: visible !important;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #2563eb;
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 999;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 100%;
        text-align: left;
        border-radius: 0;
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    .nav-links a:hover {
        background-color: rgba(255, 255, 255, 0.2);
        transform: none;
    }
    
    nav .container {
        position: relative;
    }
}

@media (max-width: 768px) {
    footer .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .id-card {
        padding: 1.5rem;
    }
}

/* Verification Page */
.verification-result {
    text-align: center;
    padding: 2rem;
}

.verification-success {
    color: #059669;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.verification-failed {
    color: #dc2626;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 2px solid #06b6d4;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    padding: 1.5rem 2rem;
    z-index: 10000;
    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 300px;
}

.cookie-banner-text p {
    margin: 0;
    color: #1f2937;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.cookie-banner-text a {
    color: #06b6d4;
    text-decoration: underline;
}

.cookie-banner-text a:hover {
    color: #0891b2;
}

.cookie-banner-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-banner-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.cookie-banner-btn-accept {
    background: #06b6d4;
    color: white;
}

.cookie-banner-btn-accept:hover {
    background: #0891b2;
}

.cookie-banner-btn-reject {
    background: #f3f4f6;
    color: #1f2937;
    border: 1px solid #d1d5db;
}

.cookie-banner-btn-reject:hover {
    background: #e5e7eb;
}

@media (max-width: 768px) {
    .cookie-banner {
        padding: 1rem;
    }
    
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .cookie-banner-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .cookie-banner-btn {
        width: 100%;
    }
}

