/**
 * Frontend styles for Tren Saatleri Plugin
 * Enhanced with train amenities and cabin classes
 */

/* Table Container */
.tren-saatleri-table-container {
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Main Table */
.tren-saatleri-table {
    margin-bottom: 0;
    font-size: 14px;
}

.tren-saatleri-table th {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 12px 8px;
    border: none;
}

.tren-saatleri-table td {
    vertical-align: middle;
    padding: 15px 8px;
    border-bottom: 1px solid #eee;
}

/* Station Name Column */
.station-name {
    background: #f8f9fa;
    font-weight: bold;
    position: relative;
    min-width: 150px;
}

.train-type-info {
    margin-top: 5px;
}

.train-type-info i {
    margin-right: 5px;
    color: #3498db;
}

/* Schedule Items */
.schedule-time {
    text-align: center;
    min-width: 120px;
}

.schedule-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.schedule-item .time {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 5px;
}

.schedule-item .time i {
    color: #3498db;
    font-size: 14px;
}

.train-name {
    margin: 2px 0;
}

.train-name small {
    font-weight: 500;
}

.schedule-item .duration {
    margin: 2px 0;
}

.schedule-item .duration i {
    margin-right: 3px;
}

.schedule-item .price .badge {
    font-size: 11px;
    padding: 4px 8px;
}

/* Amenities */
.amenities {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 5px;
}

.amenity-badge {
    display: inline-block;
    padding: 2px;
    background: #ecf0f1;
    border-radius: 3px;
    color: #2c3e50;
    font-size: 12px;
    cursor: help;
    transition: all 0.2s ease;
}

.amenity-badge:hover {
    background: #3498db;
    color: white;
    transform: scale(1.1);
}

.amenity-badge i {
    font-size: 10px;
}

/* Cabin Classes */
.cabin-classes {
    display: flex;
    gap: 3px;
    justify-content: center;
    flex-wrap: wrap;
}

.cabin-class-badge {
    background: #e8f4fd;
    color: #2980b9;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    border: 1px solid #bdc3c7;
}

/* Ticket Column */
.ticket-column {
    text-align: center;
    min-width: 100px;
}

.ticket-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: none;
    padding: 8px 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

.ticket-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.4);
}

.ticket-btn i {
    margin-right: 5px;
}

/* Schedule Info */
.schedule-info {
    background: #f8f9fa;
    padding: 15px;
    border-top: 1px solid #dee2e6;
}

.train-type-legend {
    padding: 10px;
    background: #e8f4fd;
    border-left: 4px solid #3498db;
    border-radius: 0 4px 4px 0;
}

/* Search Form */
.tren-saatleri-search-form {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.tren-saatleri-search-form .form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.tren-saatleri-search-form .form-select,
.tren-saatleri-search-form .form-control {
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.tren-saatleri-search-form .form-select:focus,
.tren-saatleri-search-form .form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.tren-saatleri-search-form .btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border: none;
    padding: 15px 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.tren-saatleri-search-form .btn-warning:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

/* Search Results */
.search-results {
    margin-top: 30px;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-header {
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: white;
    border-radius: 8px;
}

.search-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.search-header i {
    color: #3498db;
}

/* Search Results Table */
.search-results-table {
    font-size: 14px;
}

.search-results-table th {
    background: #34495e;
    color: white;
    font-weight: 600;
    padding: 15px 10px;
}

.search-results-table td {
    padding: 15px 10px;
    vertical-align: middle;
}

.schedule-row:hover {
    background: #f8f9fa;
    transform: scale(1.02);
    transition: all 0.2s ease;
}

.departure-time,
.arrival-time {
    text-align: center;
}

.departure-time strong,
.arrival-time strong {
    font-size: 18px;
    color: #2c3e50;
}

/* Train Info */
.train-info {
    text-align: center;
}

.train-info .d-flex {
    justify-content: center;
}

.train-info i {
    font-size: 20px;
    margin-right: 10px;
}

.duration .badge {
    font-size: 12px;
}

.price strong {
    color: #27ae60;
    font-size: 16px;
}

/* Station Info */
.tren-station-info {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.station-header h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 700;
}

.station-city {
    color: #7f8c8d;
    margin-bottom: 20px;
}

.station-city i {
    margin-right: 8px;
    color: #e74c3c;
}

.station-contact h5,
.station-address h5,
.station-map h5 {
    color: #34495e;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 8px;
}

.station-contact p,
.station-address p {
    margin-bottom: 10px;
    color: #555;
}

.station-contact i,
.station-address i {
    margin-right: 8px;
    color: #3498db;
    width: 16px;
}

.station-contact a {
    color: #2980b9;
    text-decoration: none;
    font-weight: 500;
}

.station-contact a:hover {
    color: #1abc9c;
}

.station-map h5 {
    margin-top: 25px;
    margin-bottom: 15px;
}

.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Breadcrumb */
.tren-breadcrumb {
    margin: 15px 0;
}

.tren-breadcrumb .breadcrumb {
    background: linear-gradient(135deg, #ecf0f1, #bdc3c7);
    padding: 12px 20px;
    border-radius: 25px;
    margin-bottom: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tren-breadcrumb .breadcrumb-item {
    font-weight: 500;
}

.tren-breadcrumb .breadcrumb-item a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
}

.tren-breadcrumb .breadcrumb-item a:hover {
    color: #3498db;
}

.tren-breadcrumb .breadcrumb-item.active {
    color: #7f8c8d;
}

/* Info Boxes */
.info-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.info-box h5 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.info-box ul {
    list-style: none;
    padding: 0;
}

.info-box li {
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    align-items: center;
}

.info-box li:last-child {
    border-bottom: none;
}

.info-box i {
    margin-right: 10px;
    width: 16px;
    color: #3498db;
}

/* Reverse Search */
.reverse-search {
    text-align: center;
    margin: 30px 0;
}

.reverse-search .btn-outline-primary {
    border: 2px solid #3498db;
    color: #3498db;
    padding: 12px 25px;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.reverse-search .btn-outline-primary:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* No Results */
.no-results .alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.no-results .alert h4 {
    margin-bottom: 15px;
}

.no-results .alert hr {
    border-top: 2px solid rgba(255,255,255,0.2);
    margin: 15px 0;
}

/* Loading Spinner */
.spinner-border {
    color: #3498db;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tren-saatleri-table-container {
        margin: 10px 0;
        border-radius: 0;
    }

    .tren-saatleri-search-form {
        padding: 20px 15px;
        margin: 15px 0;
        border-radius: 8px;
    }

    .tren-saatleri-search-form .btn-warning {
        padding: 12px 20px;
        font-size: 14px;
    }

    .search-header {
        padding: 15px;
    }

    .search-header h2 {
        font-size: 20px;
    }

    .search-results-table th,
    .search-results-table td {
        padding: 10px 5px;
        font-size: 12px;
    }

    .tren-saatleri-table th,
    .tren-saatleri-table td {
        padding: 8px 4px;
        font-size: 12px;
    }

    .schedule-item .time {
        font-size: 14px;
    }

    .ticket-btn {
        font-size: 11px;
        padding: 6px 8px;
    }

    .station-name {
        min-width: 100px;
    }

    .schedule-time {
        min-width: 80px;
    }

    .tren-station-info {
        padding: 15px;
        margin: 15px 0;
    }

    .station-header h3 {
        font-size: 20px;
    }

    .amenities {
        flex-wrap: wrap;
        gap: 2px;
    }

    .amenity-badge {
        font-size: 10px;
        padding: 1px;
    }

    .cabin-classes {
        gap: 2px;
    }

    .cabin-class-badge {
        font-size: 9px;
        padding: 1px 4px;
    }
}

@media (max-width: 576px) {
    .tren-saatleri-table th:nth-child(n+6),
    .tren-saatleri-table td:nth-child(n+6) {
        display: none;
    }

    .search-results-table .train-info {
        font-size: 11px;
    }

    .search-results-table .departure-time strong,
    .search-results-table .arrival-time strong {
        font-size: 14px;
    }

    .tren-breadcrumb .breadcrumb {
        padding: 8px 15px;
        font-size: 12px;
    }

    .tren-breadcrumb .breadcrumb-item {
        margin-bottom: 5px;
    }

    .info-box {
        padding: 15px;
    }

    .schedule-item {
        gap: 2px;
    }

    .train-name small {
        font-size: 10px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .tren-saatleri-table-container,
    .tren-saatleri-search-form,
    .tren-station-info {
        background: #2c3e50;
        color: #ecf0f1;
    }

    .tren-saatleri-table td,
    .search-results-table td {
        border-color: #34495e;
        color: #ecf0f1;
    }

    .station-name {
        background: #34495e;
        color: #ecf0f1;
    }

    .schedule-row:hover {
        background: #34495e;
    }

    .info-box {
        background: #34495e;
        color: #ecf0f1;
    }

    .tren-breadcrumb .breadcrumb {
        background: linear-gradient(135deg, #34495e, #2c3e50);
    }

    .amenity-badge {
        background: #34495e;
        color: #ecf0f1;
    }

    .cabin-class-badge {
        background: #34495e;
        color: #3498db;
        border-color: #5a6c7d;
    }
}

/* Print Styles */
@media print {
    .tren-saatleri-search-form,
    .ticket-btn,
    .reverse-search {
        display: none;
    }

    .tren-saatleri-table-container,
    .tren-station-info {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .search-header {
        background: #f5f5f5 !important;
        color: #333 !important;
    }

    .amenities,
    .cabin-classes {
        display: none;
    }
} 