/* ODQ Survey System - Main Stylesheet */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

main {
    min-height: calc(100vh - 200px);
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #002366, #001b4c);
    color: white;
    padding: 0.75rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo-link {
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 700;
}

.header-logo-link:hover {
    color: #ff6b35;
}

/* Navigation */
.main-nav, .auth-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    color: #b0b8c4;
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ff6b35;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-greeting {
    color: #b0b8c4;
    font-size: 0.85rem;
}

.logout-btn, .register-btn {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white !important;
    padding: 0.4rem 1rem !important;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.85rem;
}

.logout-btn:hover, .register-btn:hover {
    background: linear-gradient(45deg, #f7931e, #ff6b35);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 107, 53, 0.3);
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.flash-message {
    background: white;
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: opacity 0.3s ease;
    border-left: 4px solid;
}

.flash-message.success {
    border-left-color: #28a745;
}

.flash-message.error {
    border-left-color: #dc3545;
}

.flash-message.warning {
    border-left-color: #ffc107;
}

.flash-message.info {
    border-left-color: #17a2b8;
}

.flash-icon {
    font-size: 1.5rem;
}

.flash-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.flash-close:hover {
    color: #333;
}

/* Tile/Card Styles */
.tile {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Buttons */
.main-action-button, .secondary-action-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.main-action-button {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
}

.main-action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
}

.secondary-action-button {
    background: #6c757d;
    color: white;
}

.secondary-action-button:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Forms */
.auth-tile {
    max-width: 500px;
    margin: 3rem auto;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form select,
.auth-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-links a {
    color: #007bff;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Home Page Specific Styles */
.request-survey-tile {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.request-survey-left h2 {
    color: #002366;
    margin-bottom: 1rem;
}

.industry-focus-list {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.step-tile {
    background: #002366 !important;
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.step-tile h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    text-align: left;
    align-self: flex-start;
}

.step-tile p {
    margin: 0.15rem 0;
    opacity: 0.9;
    font-size: 0.8rem;
    text-align: right;
}

.empty-step-tile {
    background: #001b4c !important;
}

/* Map Styles */
.map-tile {
    padding: 2rem;
}

.map-tile h2 {
    color: #002366;
    margin-bottom: 1rem;
}

#map {
    height: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.custom-leaflet-marker {
    background-color: #ff6b35;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.map-popup-content strong {
    color: #002366;
    font-size: 1.1rem;
}

.popup-request-survey-btn {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 0.5rem;
    width: 100%;
}

/* Contact Tile */
.contact-tile {
    padding: 2rem;
}

.contact-tile h2 {
    color: #002366;
    margin-bottom: 1rem;
    text-align: left;
}

.contact-tile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.fruit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.fruit-item {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3.5rem;
}

.contact-buttons {
    background: linear-gradient(135deg, #002366, #001b4c);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

.contact-buttons p {
    color: white;
}

.contact-buttons > div:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-buttons > div:last-child {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 768px) {
    .contact-tile-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .fruit-grid {
        order: -1;
    }
}

/* Document Requirements */
.document-tiles-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.details-summary-tile h3 {
    color: #002366;
    margin-bottom: 1rem;
}

.details-summary-tile ul {
    list-style: disc;
    margin-left: 1.5rem;
    line-height: 1.8;
}

.required-documents-tile {
    border-left: 4px solid #28a745;
}

.optional-documents-tile {
    border-left: 4px solid #17a2b8;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #002366, #001b4c);
    color: #9ca3af;
    padding: 2rem 0 1rem;
    margin-top: 4rem;
    font-size: 0.85rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-section h4 {
    margin-bottom: 0.75rem;
    color: #ff6b35;
    font-size: 0.9rem;
}

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

.footer-section ul li {
    margin-bottom: 0.4rem;
    color: #9ca3af;
    font-size: 0.85rem;
}

.company-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #d1d5db;
}

.company-tagline {
    color: #9ca3af;
    font-size: 0.85rem;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.copyright {
    color: #9ca3af;
    font-size: 0.75rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .request-survey-tile,
    .document-tiles-container {
        grid-template-columns: 1fr;
    }

    .steps-container {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .flash-messages {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}
