/* Erweiterte Stile für die Wildkamera-App */

/* ------ Filterbereich ------ */
.filter-container {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-field {
    margin-bottom: 10px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.filter-chip {
    cursor: pointer;
    background-color: var(--gray-medium);
    transition: all 0.2s ease;
}

.filter-chip.active {
    background-color: var(--primary-color);
    color: white;
}

.sort-control {
    margin-top: 10px;
}

.empty-message {
    padding: 30px;
    color: var(--gray-dark);
}

/* ------ Batch-Aktionen ------ */
body.batch-mode .camera-list-item {
    position: relative;
    padding-left: 40px;
}

.camera-checkbox {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid var(--gray-medium);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

body.batch-mode .camera-checkbox {
    display: flex;
}

.camera-checkbox i {
    font-size: 22px;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.camera-list-item.selected .camera-checkbox {
    border-color: var(--primary-color);
}

.camera-list-item.selected .camera-checkbox i {
    opacity: 1;
}

.batch-action-bar {
    position: fixed;
    bottom: 66px;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 90;
}

.batch-info {
    display: flex;
    align-items: center;
    color: var(--primary-color);
}

.batch-info i {
    margin-right: 8px;
}

.batch-actions {
    display: flex;
    gap: 5px;
}

.batch-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
}

.batch-mode-toggle {
    position: absolute !important;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-light) !important;
}

.batch-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    color: white;
}

/* ------ Kameraeinstellungen ------ */
.disabled-setting {
    opacity: 0.6;
    position: relative;
}

.disabled-setting::after {
    content: "Nicht verfügbar für diesen Kameratyp";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: #FF5252;
}

.highlight-setting {
    animation: highlight-pulse 1s ease;
}

@keyframes highlight-pulse {
    0% { background-color: transparent; }
    50% { background-color: #E8F5E9; }
    100% { background-color: transparent; }
}

.sms-length-indicator {
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: monospace;
    text-align: right;
}

.length-ok {
    color: #388E3C;
}

.length-warning {
    color: #F57C00;
}

.length-error {
    color: #D32F2F;
    font-weight: bold;
}

.sending-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.sending-content {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ------ Drag & Drop ------ */
.camera-list-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.camera-list-item {
    cursor: grab;
}

/* ------ Netzwerkstatus und Synchronisation ------ */
.network-status-indicator {
    position: fixed;
    top: 70px;
    right: 20px;
    padding: 10px 15px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
    animation: slide-in 0.3s ease;
}

.network-status-indicator.online {
    background-color: #4CAF50;
    color: white;
}

.network-status-indicator.offline {
    background-color: #F44336;
    color: white;
}

.sync-indicator {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    border-radius: 8px;
    z-index: 1000;
    overflow: hidden;
    background-color: white;
}

.sync-content {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 15px;
}

.sync-content.success {
    background-color: #E8F5E9;
}

.sync-content.warning {
    background-color: #FFF3E0;
}

.sync-content.error {
    background-color: #FFEBEE;
}

.sync-content i {
    font-size: 24px;
}

.sync-content.success i {
    color: #388E3C;
}

.sync-content.warning i {
    color: #F57C00;
}

.sync-content.error i {
    color: #D32F2F;
}

.retry-btn {
    margin-left: 10px;
    padding: 0 10px;
    height: 30px;
    line-height: 30px;
    border-radius: 15px;
    background-color: rgba(0, 0, 0, 0.1);
}

.sync-indicator.syncing {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

@keyframes slide-in {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.pending-sms-badge {
    position: absolute;
    top: 0;
    right: 0;
}

.pending-sms-badge .badge {
    background-color: #FF5252;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    position: relative;
    z-index: 1;
}

.pending-sms-tooltip {
    position: absolute;
    bottom: 100%;
    right: 0;
    background-color: white;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    width: 180px;
    display: none;
    z-index: 10;
}

.pending-sms-badge:hover .pending-sms-tooltip {
    display: block;
}

.sync-now-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    margin-top: 5px;
    cursor: pointer;
    font-size: 12px;
    width: 100%;
}

.pending-sms-list {
    max-height: 60vh;
    overflow-y: auto;
}

/* Responsive Anpassungen */
@media only screen and (max-width: 600px) {
    .batch-action span {
        display: none;
    }
    
    .batch-action i {
        margin-right: 0;
    }
    
    .network-status-indicator {
        top: auto;
        bottom: 70px;
        left: 20px;
        right: auto;
    }
}

/* Fingerfreundliche Touch‑Targets für Kamera‑Aktionen */
.camera-action,
.camera-action span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    padding: 8px;
    margin: 4px;
    touch-action: manipulation;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.camera-action:active {
    transform: scale(0.95);
}


/* Kompakte, einzeilige Kameraliste */
.camera-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.camera-list-header {
  display: flex;
  align-items: center;
  flex: 1; /* füllt den Hauptbereich */
}

.camera-icon {
  margin-right: 12px;
}

.camera-info {
  display: flex;
  flex-direction: column;
  margin-right: 16px;
  font-size: 0.95rem;
}

.camera-name {
  margin: 0;
  font-weight: 500;
}

.camera-phone {
  margin: 0;
  color: #666;
  font-size: 0.85rem;
}

.camera-actions {
  display: flex;
  gap: 12px;
}

/* Optional: Hover‑Feedback */
.camera-list-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.banner-logo {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.camera-list-item .camera-icon {
  display: none !important;
}

/* Hebt selektierte Kamerazeile hervor */
.camera-list-item.selected {
  background-color: rgba(76, 175, 80, 0.3);
}


/* bessere Hervorhebung für selektierte Zeilen */
.camera-list-item {
  position: relative;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}


/* Hover-Effekt, wenn nicht selektiert */
.camera-list-item:not(.selected):hover {
  background-color: rgba(0,0,0,0.03);
}


/* Batch‑Action‑Bar: hellgraues Grau statt Weiß */
.batch-action-bar {
  background-color: #f5f5f5;    /* oder ein dezentes CSS‑Variable, z.B. var(--surface) */
}

/* Batch‑Icons: in der Primärfarbe (dunkles Grün) */
.batch-action {
  color: var(--primary-color, #388E3C) !important;
}

/* Optional: bei Hover oder Touch ein leichtes Highlight */
.batch-action:hover,
.batch-action:active {
  background-color: rgba(0,0,0,0.05);
  border-radius: 50%;
}

.setting-row {
    display: flex;
    align-items: center;
}

.setting-label-container {
    display: flex;
    align-items: center;
}

.setting-label-container .switch {
    margin-left: 10px;
}

.settings-grid .setting-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.settings-grid .setting-label {
    text-align: right;
    padding-right: 15px;
    color: rgba(0,0,0,0.7);
}

.settings-grid .setting-switch {
    display: flex;
    justify-content: center;
    align-items: center;
}

.settings-grid .setting-control {
    display: flex;
    align-items: center;
}

.settings-grid .input-field,
.settings-grid select {
    margin-top: 0;
    margin-bottom: 0;
}

/* Optional: Hover-Effekt für bessere Usability */
.settings-grid .setting-row:hover {
    background-color: rgba(0,0,0,0.05);
}

.settings-grid .setting-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.settings-grid .setting-label {
    text-align: right;
    padding-right: 15px;
    color: rgba(0,0,0,0.7);
}

.settings-grid .setting-switch {
    display: flex;
    justify-content: center;
    align-items: center;
}

.settings-grid .setting-control {
    display: flex;
    align-items: center;
}

.settings-grid .input-field,
.settings-grid select {
    margin-top: 0;
    margin-bottom: 0;
}

/* Optional: Hover-Effekt für bessere Usability */
.settings-grid .setting-row:hover {
    background-color: rgba(0,0,0,0.05);
}

.settings-grid .radio-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0;
}

.settings-grid .radio-group .col {
    padding: 0;
    text-align: center;
}

.settings-grid .radio-group label {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.add-button {
    position: fixed;       /* Fixed positioning to stay in place when scrolling */
    right: 16px;           /* Distance from right edge */
    bottom: 16px;          /* Distance from bottom (changed from 45px to standard 16px) */
    z-index: 1000;         /* Ensures button appears above other elements */
  }  


/* --- Footer-Layout ------------------------------------------------------ */
.modal-footer{
    display:flex;            /* alle Kinder in einer Zeile */
    align-items:center;      /* vertikal zentriert */
    justify-content:space-between;  /* Platz zwischen Vorschau & Buttons */
    gap:16px;                /* etwas Luft */
  }
  
  .modal-footer .sms-preview{
    margin-right:auto;       /* schiebt die Buttons ganz nach rechts */
    text-align:left;         /* linksbündiger Vorschau-Text */
  }
  
  .footer-actions{           /* optional für Button-Gruppe */
    display:flex;
    gap:8px;
  }

/* SMS-Vorschau nur im Stand-alone-Modus der PWA ausblenden */
@media (display-mode: standalone) {
    /* nur der Text — nimm stattdessen .sms-preview, wenn du die ganze Box verbergen willst */
    #smsPreviewText {
      display: none !important;
    }
  }



/* Modal-Titel „Kamera-Einstellungen“ kleiner darstellen  */
#cameraModal #modalTitle {
    font-size: 1.3rem;      /* ≈ 20 px, Materialize-Standard ist 2.28 rem */
    line-height: 1.4;       /* etwas enger, optional */
    font-weight: 500;       /* optional: etwas leichter als default */
}

/* styles-extensions.css */
html {
    /* Standard‐Browserwert ist 16 px → 100 %.  
       87.5 % ≈ 14 px, 93.75 % ≈ 15 px. */
    font-size: 93.75%;     /* ~15 px → alles ~6 % kleiner */
}
