/* ChangeDetector Public (Frontend) Styles */

.cd-public-wrapper {
    width: 100%;
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cd-public-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.cd-public-table thead {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    color: #fff;
}

.cd-public-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cd-public-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.cd-public-table tbody tr:last-child td {
    border-bottom: none;
}

.cd-public-table tbody tr:hover {
    background: #f9f9f9;
}

.cd-url-cell a {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}

.cd-url-cell a:hover {
    text-decoration: underline;
}

.cd-time-cell {
    color: #666;
    font-size: 14px;
    white-space: nowrap;
}

.cd-status-cell {
    text-align: center;
}

/* Status Badges */
.cd-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.cd-badge-changed {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #fff;
    animation: blink 1.5s infinite;
}

.cd-badge-ok {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: #fff;
}

.cd-badge-error {
    background: #dc3545;
    color: #fff;
}

.cd-badge-pending {
    background: #f0f0f0;
    color: #666;
}

@keyframes blink {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0.4;
    }
}

/* Powered By */
.cd-powered-by {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    color: #999;
    font-size: 13px;
}

.cd-powered-by a {
    color: #2271b1;
    text-decoration: none;
    font-weight: 600;
}

.cd-powered-by a:hover {
    text-decoration: underline;
}

/* No Data */
.cd-no-data {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cd-public-table {
        font-size: 14px;
    }
    
    .cd-public-table th,
    .cd-public-table td {
        padding: 10px;
    }
    
    .cd-public-table th {
        font-size: 12px;
    }
    
    .cd-badge {
        font-size: 11px;
        padding: 4px 10px;
    }
}

@media (max-width: 600px) {
    /* Stack table on mobile */
    .cd-public-table,
    .cd-public-table thead,
    .cd-public-table tbody,
    .cd-public-table th,
    .cd-public-table td,
    .cd-public-table tr {
        display: block;
    }
    
    .cd-public-table thead tr {
        display: none;
    }
    
    .cd-public-table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .cd-public-table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .cd-public-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        font-weight: bold;
        text-transform: uppercase;
        font-size: 11px;
        color: #666;
    }
    
    .cd-url-cell {
        text-align: left !important;
        padding-left: 15px !important;
    }
}
