/**
 * WeatherAFC Asset Management Table Styles
 * Enhanced styling for /locations/ page
 */

/* Container */
.vxw_manage_forecast_container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header with Add Button */
.vxw_manage_forecast_header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 24px;
    padding: 0;
}

.vxw_manage_forecast_header > a,
.vxw-add-new-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #00A9FF 0%, #0077CC 100%);
    color: #fff !important;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 50px;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 169, 255, 0.3);
}

.vxw_manage_forecast_header > a:hover,
.vxw-add-new-link:hover {
    background: linear-gradient(135deg, #00C4FF 0%, #0088EE 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 169, 255, 0.4);
}

.vxw_manage_forecast_header > a::before {
    content: '+';
    font-size: 18px;
    font-weight: bold;
}

/* Table Container */
.vxw_manage_forecast_content {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Table */
.vxw_manage_forecast_content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

/* Table Header */
.vxw_manage_forecast_content table thead tr,
.vxw_manage_forecast_content table tr:first-child {
    background: linear-gradient(135deg, #000067 0%, #0a0a7a 100%);
}

.vxw_manage_forecast_content table th,
.vxw_manage_forecast_content table tr:first-child td {
    color: #fff !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
    padding: 16px 20px;
    text-align: left;
    border: none;
}

/* Table Body */
.vxw_manage_forecast_content table tbody tr,
.vxw_manage_forecast_content table tr:not(:first-child) {
    background: #fff;
    transition: all 0.2s ease;
}

.vxw_manage_forecast_content table tbody tr:nth-child(even),
.vxw_manage_forecast_content table tr:nth-child(even):not(:first-child) {
    background: #f8fafc;
}

.vxw_manage_forecast_content table tbody tr:hover,
.vxw_manage_forecast_content table tr:not(:first-child):hover {
    background: #e8f4ff;
}

.vxw_manage_forecast_content table td {
    padding: 16px 20px;
    border-bottom: 1px solid #eef2f7;
    color: #333;
    vertical-align: middle;
}

/* Title Column - Make it stand out */
.vxw_manage_forecast_content table td:first-child {
    font-weight: 600;
    color: #000067;
}

.vxw_manage_forecast_content table td:first-child a {
    color: #00A9FF !important;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.vxw_manage_forecast_content table td:first-child a:hover {
    color: #0077CC !important;
    text-decoration: underline;
}

/* Location Column */
.vxw_manage_forecast_content table td:nth-child(2) {
    color: #555;
}

/* Alerts & Threshold Columns */
.vxw_manage_forecast_content table td:nth-child(3),
.vxw_manage_forecast_content table td:nth-child(4) {
    text-align: center;
}

/* Alerts Badge */
.vxw_manage_forecast_content table td:nth-child(3):not(:empty) {
    position: relative;
}

/* Action Links */
.vxw_manage_forecast_content table td:last-child {
    text-align: right;
    white-space: nowrap;
}

.vxw_manage_forecast_content table td a {
    color: #00A9FF;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-block;
}

.vxw_manage_forecast_content table td a:hover {
    background: #e8f4ff;
    color: #0077CC;
}

/* Edit Link */
.vxw_manage_forecast_content table td a[href*="edit"],
.vxw_manage_forecast_content table td a:first-child {
    color: #00A9FF;
}

/* Delete Link */
.vxw_manage_forecast_content table td a[href*="delete"],
.vxw_manage_forecast_content table td a:last-child {
    color: #dc3545;
}

.vxw_manage_forecast_content table td a[href*="delete"]:hover,
.vxw_manage_forecast_content table td a:last-child:hover {
    background: #fff0f0;
    color: #c82333;
}

/* Separator between action links */
.vxw_manage_forecast_content table td:last-child {
    font-size: 0; /* Hide the | separator */
}

.vxw_manage_forecast_content table td:last-child a {
    font-size: 14px;
    margin: 0 2px;
}

/* Empty State */
.vxw_manage_forecast_content table td[colspan] {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Status Indicators */
.vxw-status-active {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #22c55e;
    font-weight: 500;
}

.vxw-status-active::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Threshold Badge */
.vxw-threshold-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #e8f4ff;
    color: #0077CC;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .vxw_manage_forecast_container {
        padding: 0 12px;
    }

    .vxw_manage_forecast_content {
        border-radius: 12px;
        overflow-x: auto;
    }

    .vxw_manage_forecast_content table {
        min-width: 600px;
    }

    .vxw_manage_forecast_content table th,
    .vxw_manage_forecast_content table td {
        padding: 12px 16px;
    }

    .vxw_manage_forecast_header > a,
    .vxw-add-new-link {
        padding: 10px 20px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .vxw_manage_forecast_content table th,
    .vxw_manage_forecast_content table td {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Dark theme support for map pages */
.has-map .vxw_manage_forecast_content {
    background: rgba(255, 255, 255, 0.95);
}
