/*! Copyright (c) 2025-2026 Markus Schüssler. All rights reserved.
 * SPDX-License-Identifier: LicenseRef-Markus-Schuessler-Proprietary; see repository LICENSE.
 */
/* Modern Popup Styles */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeInBackdrop 0.3s ease-out;
}

.popup-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 32px;
    max-width: 750px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.9);
    animation: slideInUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.popup-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 12px 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.popup-subtitle {
    color: #7f8c8d;
    font-size: 16px;
    text-align: center;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.dropzone {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
  background: #f9f9f9;
}

.file-input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 100%;
  margin-bottom: 10px;
}

.dropzone-hint {
  color: #888;
  font-size: 0.9em;
}

.popup-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.popup-footnote {
    margin-top: 15px;
    margin-bottom: 15px;
    font-size: 0.85em;
  color: #0066cc;
  background: #e8f4fd;
  border: 1px solid #bee5eb;
  border-radius: 8px;
    padding: 10px 16px;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0,102,204,0.08);
}

.popup-upload-row {
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(280px, 0.95fr);
    gap: 14px;
    align-items: stretch;
    margin-bottom: 14px;
}

.popup-upload-row .aircraft-type-section {
    margin: 0;
    height: 100%;
}

.popup-upload-row .modern-dropzone {
    margin: 0;
}

.email-row {
    margin: 15px 0;
    padding: 12px;
    border-radius: 8px;
}

.email-row--guest {
    background: #ffe5e5;
}

.email-row--authenticated {
    background: #eef6ff;
    border: 1px solid rgba(52, 152, 219, 0.22);
}

.email-row__label {
    display: block;
    font-size: 0.95em;
}

.email-row__note {
    display: block;
    margin-top: 2px;
    font-size: 0.85em;
    color: #666;
}

.email-row__input {
    width: 100%;
    margin-top: 8px;
}

.email-row__remember {
    margin-top: 8px;
}

.email-row__checkbox {
    font-size: 0.9em;
    cursor: pointer;
}

/* Modern Dropzone Styles */
.modern-dropzone {
    border: 2px dashed #34495e;
    border-radius: 10px;
    padding: 16px 14px;
    text-align: left;
    background: linear-gradient(135deg, #f8f9fa 0%, #edf2f6 100%);
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    align-items: stretch;
    margin: 0;
    box-shadow: 0 2px 10px rgba(52, 73, 94, 0.08);
}

.modern-dropzone:hover {
    border-color: #2980b9;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.18);
}

.modern-dropzone.drag-over {
    border-color: #27ae60;
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c8 100%);
    border-style: solid;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.28);
}

.modern-dropzone.is-error {
    border-color: #e74c3c;
    background: linear-gradient(135deg, #ffeaea 0%, #ffcccc 100%);
    box-shadow: 0 4px 14px rgba(231, 76, 60, 0.18);
}

.dropzone-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
}

.dropzone-content--error {
    justify-content: flex-start;
}

.upload-icon {
    font-size: 36px;
    color: #2c3e50;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.upload-icon--error {
    color: #e74c3c;
    font-size: 32px;
}

.modern-dropzone:hover .upload-icon {
    color: #2980b9;
    transform: scale(1.05);
}

.modern-dropzone.drag-over .upload-icon {
    color: #27ae60;
    animation: bounce 0.6s ease-in-out;
}

.dropzone-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.primary-text {
    font-size: 16px;
    font-weight: 700;
    color: #1f2d3d;
}

.primary-text--error {
    color: #e74c3c;
}

.secondary-text {
    font-size: 12px;
    color: #6c7a89;
    line-height: 1.4;
}

.file-types {
    display: flex;
    gap: 8px;
    margin-top: 0;
    margin-left: auto;
}

.file-type-badge {
    background: #2c3e50;
    color: white;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.hidden-file-input {
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Selected Files Display */
.selected-files {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
    display: none;
}

.files-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #27ae60;
    font-weight: 600;
    margin-bottom: 10px;
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.file-info {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.file-icon {
    color: #34495e;
    font-size: 16px;
}

.file-details {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.file-name {
    overflow-wrap: anywhere;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.file-size {
    color: #7f8c8d;
    font-size: 12px;
}

.remove-file {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.remove-file:hover {
    background: #ffe5e5;
    transform: scale(1.1);
}

/* Modern Form Elements */
.modern-input {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.modern-input:focus {
    border-color: #34495e;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

.aircraft-type-section {
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8fbff 0%, #f1f5f9 100%);
}

.aircraft-type-label {
    display: block;
    font-weight: 600;
    font-size: 0.95em;
    color: #1f2d3d;
    margin-bottom: 8px;
}

.aircraft-type-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.aircraft-type-option {
    padding: 10px 14px;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    font-size: 0.9em;
}

.aircraft-type-option .checkmark {
    margin-right: 6px;
}

.aircraft-type-option.is-selected {
    border-color: #4a90e2;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.12) 0%, rgba(74, 144, 226, 0.05) 100%);
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.15);
}

.aircraft-type-other {
    margin-bottom: 10px;
    display: none;
}

.aircraft-type-hint {
    font-size: 0.8em;
    color: #dc3545;
}

.modern-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.modern-checkbox input[type="checkbox"] {
    display: block;
    position: absolute;
    width: 20px;
    height: 20px;
    opacity: 0;
    margin: 0;
}

.modern-checkbox:focus-within {
    outline: 2px solid #2563eb;
    outline-offset: 3px;
}

.checkmark {
    position: relative;
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #bdc3c7;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modern-checkbox input[type="checkbox"]:checked + .checkmark {
    background: #34495e;
    border-color: #34495e;
}

.checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 3px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.modern-checkbox input[type="checkbox"]:checked + .checkmark::after {
    display: block;
}

/* Modern Buttons */
.modern-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.modern-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.modern-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary.modern-btn {
    background: #4BA4E6;
    color: white;
}

.btn-secondary.modern-btn {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}

.btn-secondary.modern-btn:not(:disabled):hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7b7d 100%);
}

/* Animations */
@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0) scale(1.1);
    }
    40% {
        transform: translateY(-10px) scale(1.2);
    }
    80% {
        transform: translateY(-5px) scale(1.15);
    }
}

@keyframes fadeInBackdrop {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Custom Scrollbar for Popup Content */
.popup-content::-webkit-scrollbar {
    width: 8px;
}

.popup-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.popup-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #34495e 0%, #2980b9 100%);
    border-radius: 4px;
}

.popup-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
}

@media (max-width: 980px) {
    .popup-upload-row {
        grid-template-columns: 1fr;
    }
}

/* Responsive Design for Popup */
@media (max-width: 768px) {
    .popup-content {
        padding: 24px 20px;
        margin: 16px;
        width: calc(100% - 32px);
        border-radius: 12px;
    }
    
    .popup-title {
        font-size: 20px;
    }
    
    .popup-subtitle {
        font-size: 15px;
    }
    
    .popup-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .modern-btn {
        width: 100%;
        justify-content: center;
    }
    
    .email-row {
        padding: 16px;
        margin: 16px 0;
    }
    
    .popup-footnote {
        padding: 12px;
        font-size: 12px;
    }
    
    .data-limitations {
        padding: 12px;
        font-size: 12px;
        margin-bottom: 16px;
    }

    .dropzone-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .dropzone-text {
        align-items: center;
    }

    .file-types {
        margin: 6px 0 0 0;
        justify-content: center;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .popup {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .popup-content {
        background: #ffffff;
        border: 2px solid #000000;
    }
    
    .email-row {
        border: 2px solid #000000;
        background: #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .popup, .popup-content, .modern-btn {
        animation: none;
        transition: none;
    }
}
