/* shared-styles.css - Common styles for all Traffic Tools pages */

:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #34495e;
    --success: #2ecc71;
    --warning: #f39c12;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
}

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

/* Header Styles */
header {
    background-color: var(--primary);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo span {
    color: var(--secondary);
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
}

nav li {
    position: relative;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 1rem;
    display: block;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: var(--dark);
}

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

.btn:hover {
    background-color: #2980b9;
}

.btn-submit {
    background-color: var(--secondary);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #2980b9;
}

/* Page Content */
.page-content {
    padding: 2rem 0;
    min-height: calc(100vh - 140px); /* Adjust based on header/footer height */
}

.page-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--primary);
}

/* Card Styles */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.card-header {
    background-color: var(--primary);
    color: white;
    padding: 1.5rem;
}

.card-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.card-content {
    padding: 1.5rem;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Results/Output Styles */
.results-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-top: 2rem;
}

.results-header {
    background-color: var(--success);
    color: white;
    padding: 1rem 1.5rem;
}

.results-content {
    padding: 1.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: bold;
    color: var(--primary);
}

.result-value {
    font-size: 1.1rem;
    color: var(--dark);
}

/* Alert/Warning Styles */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* Footer */
.footer {
    background-color: var(--dark);
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 0.9rem;
    color: #ccc;
}

/* Mobile Responsive */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    nav ul {
        position: fixed;
        flex-direction: column;
        background-color: var(--primary);
        width: 100%;
        top: 60px;
        left: 0;
        right: 0;
        height: 0;
        overflow: hidden;
        transition: height 0.3s;
    }
    
    nav ul.active {
        height: auto;
        padding-bottom: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
}