/* Sea Log Shared Styles - Extracted from styling.py */

/* CSS Variables matching Colors class from styling.py */
:root {
    /* Maritime theme colors */
    --primary: #1e3a8a;
    --secondary: #3b82f6;
    --accent: #17a2b8;
    
    /* Status colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Text colors */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-white: white;
    
    /* Background colors */
    --background-light: #f8fafc;
    --surface-light: #ffffff;
    
    /* Gradient styles */
    --auth-gradient: linear-gradient(90deg, #1e3a8a, #17a2b8);
    --tool-card-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --cta-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Entry type colors */
    --sea-going-bg: #E3F2FD;
    --sea-going-border: #2196F3;
    --in-port-bg: #E8F5E8;
    --in-port-border: #4CAF50;
}

/* Base 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: var(--text-primary);
    background-color: var(--background-light);
}

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

/* Header styling matching auth_header */
.auth-header {
    background: var(--auth-gradient);
    color: white;
    padding: 60px 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.auth-header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: white !important;
}

.auth-header .tagline {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 30px;
    color: white !important;
}

/* Ensure all text in auth-header is white */
.auth-header * {
    color: white !important;
}

/* Buttons matching Streamlit button styling */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    border: 1px solid;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: #1e40af;
    border-color: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--secondary);
    border-color: var(--secondary);
}

.btn-secondary:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Section styling */
.section {
    padding: 60px 0;
}

.section-light {
    background-color: var(--surface-light);
}

.section-alt {
    background-color: var(--background-light);
}

/* Cards matching tool showcase styling */
.card {
    background: var(--surface-light);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(30, 58, 138, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

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

/* Feature grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.3rem; }

p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Center content utility */
.text-center {
    text-align: center;
}

.content-center {
    max-width: 800px;
    margin: 0 auto;
}

/* Entry type badges matching styling.py */
.badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

.badge-sea-going {
    background-color: var(--sea-going-bg);
    border-left: 4px solid var(--sea-going-border);
    color: var(--sea-going-border);
}

.badge-in-port {
    background-color: var(--in-port-bg);
    border-left: 4px solid var(--in-port-border);
    color: var(--in-port-border);
}

/* Icon styling */
.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--secondary);
}

/* CTA Section matching auth_cta_section */
.cta-section {
    background: var(--auth-gradient);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.cta-section h2 {
    color: white;
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.cta-section p {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Info boxes matching render_info_box */
.info-box {
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid;
}

.info-box-info {
    background-color: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.info-box-success {
    background-color: #d1fae5;
    border-color: #a7f3d0;
    color: #065f46;
}

.info-box-warning {
    background-color: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

/* Lists */
.benefit-list {
    max-width: 800px;
    margin: 0 auto;
}

.benefit-item {
    display: flex;
    align-items: start;
    margin-bottom: 25px;
}

.benefit-icon {
    color: var(--success);
    font-size: 1.5rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.benefit-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
}

footer p {
    color: white;
    opacity: 0.8;
}

/* Placeholder section */
.coming-soon {
    text-align: center;
    padding: 40px;
    background-color: var(--surface-light);
    border-radius: 10px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-header {
        padding: 40px 0;
    }
    
    .auth-header h1 {
        font-size: 2rem;
    }
    
    .auth-header .tagline {
        font-size: 1.1rem;
    }
    
    h2 {
        font-size: 1.7rem;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .cta-section {
        padding: 60px 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card {
        padding: 20px;
    }
}

/* Utility classes */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.text-primary { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

/* PDF Examples Grid */
.pdf-examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.pdf-example {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.pdf-example:hover {
    transform: translateY(-5px);
}

.pdf-example img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.3s ease;
}

.pdf-example:hover img {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.pdf-caption {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Responsive adjustments for PDF examples */
@media (max-width: 768px) {
    .pdf-examples-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .pdf-examples-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}