/**
 * Drone Pre-Flight Checklist WordPress Plugin Styles
 * Version 1.2.0
 */

.drone-checklist-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 800px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.drone-checklist-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #3b82f6;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.drone-checklist-header-content {
    flex: 1;
    min-width: 200px;
}

.drone-checklist-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.drone-checklist-download-btn:hover {
    background: #1d4ed8;
}

.drone-checklist-download-btn svg {
    flex-shrink: 0;
}

.drone-checklist-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.drone-checklist-region {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Progress Bar */
.drone-checklist-progress-bar {
    position: relative;
    height: 28px;
    margin-bottom: 1.5rem;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.drone-checklist-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.drone-checklist-progress-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    z-index: 1;
}

.drone-checklist-progress-bar.complete .drone-checklist-progress-fill {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.drone-checklist-progress-bar.complete .drone-checklist-progress-text {
    color: #ffffff;
}

/* Title visibility for collapsed state */
.drone-checklist-title-short {
    display: none;
}

.drone-checklist-section.collapsed .drone-checklist-title-full {
    display: none;
}

.drone-checklist-section.collapsed .drone-checklist-title-short {
    display: inline;
    font-size: 0.9rem;
}

.drone-checklist-section.collapsed .drone-checklist-category {
    background: #3b82f6;
    color: #ffffff;
    font-size: 0.8125rem;
    padding: 0.375rem 1rem;
}

.drone-checklist-section.collapsed.complete {
    border-color: #10b981;
}

.drone-checklist-section.collapsed.complete .drone-checklist-toggle {
    background: #10b981;
}

.drone-checklist-section.collapsed.complete .drone-checklist-category {
    background: #10b981;
}

.drone-checklist-section {
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.drone-checklist-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9fafb;
    cursor: pointer;
    transition: background 0.2s;
}

.drone-checklist-section-header:hover {
    background: #f3f4f6;
}

.drone-checklist-section-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.drone-checklist-toggle {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 1.25rem;
    height: 1.25rem;
    background: #3b82f6;
    color: #ffffff;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: bold;
}

.drone-checklist-section.collapsed .drone-checklist-toggle {
    background: #6b7280;
}

.drone-checklist-category {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 9999px;
}

.drone-checklist-description {
    margin: 0;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #6b7280;
    background: #fafafa;
    border-top: 1px solid #e5e7eb;
}

.drone-checklist-section.collapsed .drone-checklist-description,
.drone-checklist-section.collapsed .drone-checklist-items {
    display: none;
}

.drone-checklist-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.drone-checklist-items li {
    padding: 0.75rem 1rem;
    border-top: 1px solid #f3f4f6;
}

.drone-checklist-items li:hover {
    background: #fafafa;
}

.drone-checklist-item-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.drone-checklist-items label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    flex: 1;
}

.drone-checklist-checkbox {
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.125rem;
    cursor: pointer;
    accent-color: #3b82f6;
}

.drone-checklist-text {
    flex: 1;
    font-size: 0.9375rem;
    color: #374151;
    line-height: 1.5;
}

.drone-checklist-checkbox:checked + .drone-checklist-text {
    text-decoration: line-through;
    color: #9ca3af;
}

.drone-checklist-required {
    color: #ef4444;
    font-weight: bold;
    margin-left: 0.25rem;
}

/* Info Button and Panel */
.drone-checklist-info-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #9ca3af;
    transition: all 0.2s;
}

.drone-checklist-info-btn:hover {
    background: #e5e7eb;
    color: #3b82f6;
}

.drone-checklist-info-btn svg {
    width: 16px;
    height: 16px;
}

.drone-checklist-info-panel {
    display: none !important;
    margin-top: 0.5rem;
    margin-left: 1.875rem;
    padding: 0.75rem;
    background: #f0f9ff;
    border-left: 3px solid #3b82f6;
    border-radius: 0 4px 4px 0;
    font-size: 0.8125rem;
    color: #374151;
    line-height: 1.5;
}

.drone-checklist-info-panel.visible {
    display: block !important;
}

.drone-checklist-info-panel strong {
    color: #1d4ed8;
}

.drone-checklist-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.drone-checklist-footer p {
    margin: 0;
    font-size: 0.75rem;
    color: #9ca3af;
}

.drone-checklist-error {
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #dc2626;
}

/* Dark Theme */
.drone-checklist-theme-dark {
    background: #1f2937;
    border-color: #374151;
}

.drone-checklist-theme-dark .drone-checklist-header {
    border-bottom-color: #3b82f6;
}

.drone-checklist-theme-dark .drone-checklist-header h2 {
    color: #f9fafb;
}

.drone-checklist-theme-dark .drone-checklist-region {
    color: #9ca3af;
}

.drone-checklist-theme-dark .drone-checklist-progress-bar {
    background: #374151;
}

.drone-checklist-theme-dark .drone-checklist-progress-text {
    color: #e5e7eb;
}

.drone-checklist-theme-dark .drone-checklist-progress-bar.complete .drone-checklist-progress-text {
    color: #ffffff;
}

.drone-checklist-theme-dark .drone-checklist-section {
    border-color: #374151;
}

.drone-checklist-theme-dark .drone-checklist-section-header {
    background: #111827;
}

.drone-checklist-theme-dark .drone-checklist-section-header:hover {
    background: #1f2937;
}

.drone-checklist-theme-dark .drone-checklist-section-header h3 {
    color: #e5e7eb;
}

.drone-checklist-theme-dark .drone-checklist-category {
    background: #1e3a5f;
    color: #60a5fa;
}

.drone-checklist-theme-dark .drone-checklist-description {
    background: #111827;
    border-top-color: #374151;
    color: #9ca3af;
}

.drone-checklist-theme-dark .drone-checklist-items li {
    border-top-color: #374151;
}

.drone-checklist-theme-dark .drone-checklist-items li:hover {
    background: #111827;
}

.drone-checklist-theme-dark .drone-checklist-text {
    color: #e5e7eb;
}

.drone-checklist-theme-dark .drone-checklist-checkbox:checked + .drone-checklist-text {
    color: #6b7280;
}

.drone-checklist-theme-dark .drone-checklist-info-btn {
    color: #6b7280;
}

.drone-checklist-theme-dark .drone-checklist-info-btn:hover {
    background: #374151;
    color: #60a5fa;
}

.drone-checklist-theme-dark .drone-checklist-info-panel {
    background: #1e3a5f;
    border-left-color: #3b82f6;
    color: #e5e7eb;
}

.drone-checklist-theme-dark .drone-checklist-info-panel strong {
    color: #60a5fa;
}

.drone-checklist-theme-dark .drone-checklist-footer {
    border-top-color: #374151;
}

.drone-checklist-theme-dark .drone-checklist-footer p {
    color: #6b7280;
}

.drone-checklist-theme-dark .drone-checklist-completion-message {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    border-color: #10b981;
}

.drone-checklist-theme-dark .drone-checklist-completion-message h3 {
    color: #ecfdf5;
}

.drone-checklist-theme-dark .drone-checklist-completion-message p {
    color: #a7f3d0;
}

/* Completion Message */
.drone-checklist-completion-message {
    margin-top: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
    border-radius: 12px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.drone-checklist-completion-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.drone-checklist-completion-message h3 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #065f46;
}

.drone-checklist-completion-message p {
    margin: 0 0 1.5rem;
    color: #047857;
    font-size: 1rem;
}

.drone-checklist-reset-btn {
    padding: 0.75rem 1.5rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.drone-checklist-reset-btn:hover {
    background: #059669;
}

/* Light Theme (explicit) */
.drone-checklist-theme-light {
    background: #ffffff;
    border-color: #e5e7eb;
}

/* All Countries Container */
.drone-checklist-all-container {
    max-width: 900px;
    margin: 2rem auto;
}

.drone-checklist-all-container > h2 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2rem;
}

.drone-checklist-country-section {
    margin-bottom: 2rem;
}

.drone-checklist-country-section .drone-checklist-container {
    margin: 0;
}

/* Print Styles */
@media print {
    .drone-checklist-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .drone-checklist-section.collapsed .drone-checklist-description,
    .drone-checklist-section.collapsed .drone-checklist-items {
        display: block !important;
    }
    
    .drone-checklist-toggle {
        display: none;
    }
    
    .drone-checklist-info-btn {
        display: none;
    }
    
    .drone-checklist-info-panel {
        display: block !important;
    }
}

/* Responsive */
@media (max-width: 640px) {
    .drone-checklist-container {
        margin: 1rem;
        padding: 1rem;
    }
    
    .drone-checklist-header h2 {
        font-size: 1.25rem;
    }
    
    .drone-checklist-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .drone-checklist-category {
        align-self: flex-start;
    }
    
    .drone-checklist-info-panel {
        margin-left: 0;
    }
}
