/**
 * attendance-ext.css
 * Styles for the GPS Attendance Extension.
 * Only affects new elements injected by attendance-gps.js.
 * No overrides of existing styles.
 */

/* ── GPS Verify Button ──────────────────────────────────────── */
.att-gps-btn {
    background: linear-gradient(135deg, #1a56db 0%, #1e40af 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(26, 86, 219, 0.25);
}

.att-gps-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1a3a8f 100%);
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.35);
    transform: translateY(-1px);
}

.att-gps-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(26, 86, 219, 0.2);
}

.att-gps-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ── GPS Status Badge ────────────────────────────────────────── */
#att-gps-badge,
#dash-gps-badge {
    display: none;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border);
    animation: gps-badge-fade-in 0.3s ease;
}

@keyframes gps-badge-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── GPS Configuration Card in School Settings ──────────────── */
.gps-config-card {
    margin-top: 24px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f0f5ff 0%, #e8f0fe 100%);
    border: 1px solid #c7d7fd;
    border-radius: 12px;
    position: relative;
}

.gps-config-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #1a56db, #1e40af);
    border-radius: 12px 0 0 12px;
}

.gps-config-card h4 {
    color: #1a3a8f;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gps-config-card .gps-desc {
    font-size: 12px;
    color: #475569;
    margin: 0 0 16px 0;
    line-height: 1.6;
}

.gps-config-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .gps-config-row {
        grid-template-columns: 1fr;
    }
}

.gps-config-row .field label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 4px;
}

.gps-config-row .field input {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #c7d7fd;
    border-radius: 7px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.gps-config-row .field input:focus {
    outline: none;
    border-color: #1a56db;
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}

.gps-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.gps-toggle-row .gps-toggle-label {
    font-size: 13px;
    font-weight: 600;
    color: #1a3a8f;
}

.gps-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.gps-status-indicator.enabled {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.gps-status-indicator.disabled {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
    border: 1px solid rgba(100, 116, 139, 0.2);
}

/* ── Locate Button ──────────────────────────────────────────── */
.btn-gps-locate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    border: 1.5px solid #c7d7fd;
    border-radius: 7px;
    color: #1a56db;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'DM Sans', sans-serif;
}

.btn-gps-locate:hover {
    background: #f0f5ff;
    border-color: #1a56db;
}

.btn-gps-locate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── GPS Log Modal ─────────────────────────────────────────── */
.gps-log-table th,
.gps-log-table td {
    font-size: 12px;
    padding: 8px 12px;
}

.gps-pass-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.gps-pass-badge.pass {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.gps-pass-badge.fail {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}
