/* settings-backup.css — Export/Import Settings pages */

/* Wider text input for profile name (the default .setting-input is 120px) */
.setting-input.setting-input-wide {
    width: 100%;
    max-width: 100%;
    text-align: left;
    margin-left: 12px;
}

body.theme-dark .setting-input.setting-input-wide {
    background: rgba(118, 118, 128, 0.24);
    color: #ffffff;
}

/* Section header (the "Include in export" / "Saved profiles" label rows) */
.export-section-header {
    border-bottom: 0.5px solid rgba(120, 120, 128, 0.3);
}

/* Checkbox row used by the export page */
.export-checkbox-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    min-height: 44px;
    cursor: pointer;
    border-bottom: 0.5px solid rgba(120, 120, 128, 0.18);
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.08);
}

.export-checkbox-row:last-child {
    border-bottom: none;
}

/* Coupled rows that travel together as one logical unit (e.g. Schedule +
   Time-relative-to + Timezone + Lat/Lon). The group renders as one tight
   block: the inter-row separator is hidden so they read as a single item,
   and the rows themselves get tighter vertical padding. */
.export-checkbox-row.export-grouped {
    padding-top: 8px;
    padding-bottom: 8px;
    min-height: 36px;
}

.export-checkbox-row.export-grouped-first,
.export-checkbox-row.export-grouped-mid {
    border-bottom: none;
}

.export-checkbox-row.export-grouped-first {
    padding-top: 12px;
}

.export-checkbox-row.export-grouped-last {
    padding-bottom: 12px;
}

/* Indent sub-items so the visual hierarchy reads as
   Schedule
     ↳ Time relative to
     ↳ Timezone
     ↳ Lat / Lon */
.export-checkbox-row.export-grouped-mid .export-chk-label,
.export-checkbox-row.export-grouped-last .export-chk-label {
    padding-left: 12px;
}

.export-checkbox-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #007aff;
    flex-shrink: 0;
    margin-right: 12px;
}

.export-checkbox-row input[type="checkbox"]:disabled {
    opacity: 0.6;
}

.export-chk-label {
    flex: 1;
    font-size: 16px;
    color: #ffffff;
    line-height: 22px;
}

.export-checkbox-row input[type="checkbox"]:disabled + .export-chk-label {
    color: #8e8e93;
}

.export-chk-hint {
    font-size: 13px;
    color: #8e8e93;
    flex-shrink: 0;
    margin-left: 8px;
}

.export-chk-hint:empty {
    display: none;
}

/* Post-export result */
.export-result-card {
    padding: 24px 16px;
    text-align: center;
}

.export-result-icon {
    font-size: 48px;
    color: #34c759;
    margin-bottom: 12px;
}

.export-result-message {
    font-size: 17px;
    color: #ffffff;
    margin-bottom: 20px;
}

.export-result-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.export-result-actions .btn {
    width: 100%;
}

/* WiFi-bundled download warning modal (web only) */
.export-wifi-warning {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.export-wifi-warning-card {
    background: #1c1c1e;
    border-radius: 14px;
    padding: 20px 18px;
    max-width: 340px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.export-wifi-warning-title {
    font-size: 17px;
    font-weight: 600;
    color: #ff9500;
    margin-bottom: 8px;
}

.export-wifi-warning-body {
    font-size: 14px;
    color: #c7c7cc;
    line-height: 1.45;
    margin-bottom: 16px;
}

.export-wifi-warning-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.export-wifi-warning-actions .btn {
    flex: 1;
}

/* Import — profile list rows */
.import-profile-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    min-height: 56px;
    cursor: pointer;
    border-bottom: 0.5px solid rgba(120, 120, 128, 0.18);
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.08);
}

.import-profile-row:last-child {
    border-bottom: none;
}

.import-profile-row:active {
    background: #2c2c2e;
}

.import-profile-row .import-profile-icon {
    font-size: 20px;
    width: 32px;
    margin-right: 12px;
    flex-shrink: 0;
}

.import-profile-row .import-profile-body {
    flex: 1;
    min-width: 0;
}

.import-profile-row .import-profile-name {
    font-size: 16px;
    color: #ffffff;
    line-height: 22px;
}

.import-profile-row .import-profile-meta {
    font-size: 13px;
    color: #8e8e93;
    line-height: 18px;
    margin-top: 1px;
}

.import-profile-row .import-profile-delete {
    width: 32px;
    height: 32px;
    border-radius: 16px;
    background: rgba(255, 59, 48, 0.15);
    color: #ff3b30;
    border: none;
    flex-shrink: 0;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    margin-left: 8px;
}

.import-profile-empty {
    padding: 20px 16px;
    text-align: center;
    color: #8e8e93;
    font-size: 14px;
}

/* Import detail — checkbox rows (reuse export styling) */

/* Banners shown above Apply / on the progress screen */
.import-banner {
    margin: 12px 16px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.45;
}

.import-banner-warn {
    background: rgba(255, 149, 0, 0.12);
    border: 1px solid rgba(255, 149, 0, 0.35);
    color: #ff9500;
}

/* Progress list rows */
.import-progress-row {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    min-height: 36px;
    font-size: 15px;
    border-bottom: 0.5px solid rgba(120, 120, 128, 0.12);
}

.import-progress-row:last-child {
    border-bottom: none;
}

.import-progress-row .import-progress-status {
    width: 20px;
    margin-right: 12px;
    text-align: center;
    flex-shrink: 0;
}

.import-progress-row[data-status="pending"] .import-progress-status {
    color: #8e8e93;
}

.import-progress-row[data-status="done"] .import-progress-status {
    color: #34c759;
}

.import-progress-row[data-status="error"] .import-progress-status {
    color: #ff3b30;
}

.import-progress-row .import-progress-label {
    flex: 1;
    color: #ffffff;
}

.import-progress-row[data-status="error"] .import-progress-label {
    color: #ff3b30;
}

.import-progress-row .import-progress-msg {
    font-size: 12px;
    color: #ff3b30;
    margin-left: 8px;
}

/* Button widths for the import detail page (Apply + Cancel stacked) */
#page_import_settings .btn-full-width {
    width: calc(100% - 32px);
    margin: 8px 16px;
}
