/* CamCheck Dashboard Styles */

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

.site-list {
    max-width: 1000px;
    margin: 0 auto;
}

/* Button styles */
.button-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 0 auto 30px auto;
}

.action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    min-width: 200px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.2s, transform 0.1s;
    height: 46px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.action-button i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.refresh-button {
    background-color: #4d6ef7;
    color: white;
}

.refresh-button:hover {
    background-color: #3a5be2;
}

.download-button {
    background-color: #28a745;
    color: white;
}

.download-button:hover {
    background-color: #218838;
}

/* Site card styles */
.site-card {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.site-header {
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.site-content {
    display: none;
    padding: 0 20px 20px;
}

/* Table styles */
.camera-table {
    width: 100%;
    border-collapse: collapse;
}

.camera-table th, 
.camera-table td {
    text-align: left;
    padding: 12px 8px;
    border-bottom: 1px solid #ddd;
}

.camera-table th {
    background-color: #f8f8f8;
}

/* Status styles */
.status-ok {
    background-color: #d4edda;
    color: #155724;
}

.status-warning {
    background-color: #fff3cd;
    color: #856404;
}

.status-critical {
    background-color: #f8d7da;
    color: #721c24;
}

.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-indicator.ok { 
    background-color: #28a745; 
}

.status-indicator.warning { 
    background-color: #ffc107; 
}

.status-indicator.critical { 
    background-color: #dc3545; 
}

/* Info and footer styles */
.last-updated {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
    margin-top: 30px;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 70%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-button {
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
}

.close-button:hover {
    color: #333;
}

/* Form styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-group textarea {
    width: 100%;
    height: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: monospace;
}

.form-group .help-text {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

/* Radio button styles */
.radio-group {
    margin-top: 8px;
}

.radio-label {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
}

.radio-text {
    font-weight: bold;
    margin-left: 5px;
}

.radio-label .help-text {
    margin-left: 23px;
    margin-top: 2px;
}

/* Generate button */
.generate-button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    transition: background-color 0.2s;
}

.generate-button:hover {
    background-color: #218838;
}

.generate-button i {
    margin-right: 8px;
}

/* Success message */
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

/* Instructions panel */
.instructions-panel {
    margin-bottom: 20px;
}

.instruction-option {
    background-color: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.instruction-option h4 {
    margin-top: 0;
    color: #333;
}

.instruction-option pre {
    background-color: #f1f1f1;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    font-family: Consolas, monospace;
}

.button-row {
    text-align: center;
    margin-top: 20px;
}

/* Debug info panel */
.debug-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: left;
}

/* Fix site content toggle logic */
.site-content {
    display: none;
    padding: 0 20px 20px;
}

.site-card.open .site-content {
    display: block;
}
