/* Execute Plan - Mobile-First Travel Companion Styles */

:root {
    --primary: #1a2332;
    --accent: #00a8e8;
    --accent-hover: #0096d1;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --bg-dark: #0f1419;
    --bg-main: #1a2332;
    --bg-card: #ffffff;
    --bg-light: #f7fafc;
    --bg-checked: #f0fdf4;
    
    --text-dark: #1f2937;
    --text-medium: #6b7280;
    --text-light: #9ca3af;
    --text-white: #ffffff;
    
    --border: #e5e7eb;
    --border-dark: #d1d5db;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-bottom: env(safe-area-inset-bottom);
}

.container {
    max-width: 100%;
    min-height: 100vh;
    padding-bottom: 80px;
}

/* Header */
.exec-header {
    background: var(--primary);
    color: var(--text-white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    gap: 12px;
}

.back-link {
    color: var(--text-white);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: background 0.2s;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.exec-header h1 {
    flex: 1;
    font-size: 1.25rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-btn {
    background: none;
    border: none;
    color: var(--text-white);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Progress Bar */
.progress-bar {
    position: relative;
    height: 40px;
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success) 0%, #059669 100%);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--primary);
    color: var(--text-white);
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 95%;
    text-align: center;
    line-height: 1.5;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.menu-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.menu-overlay.active .menu-content {
    transform: translate(-50%, -50%) scale(1);
}

.close-menu {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-medium);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    line-height: 1;
    flex-shrink: 0;
    margin-left: 8px;
    transition: background 0.2s;
}

.close-menu:hover {
    background: var(--bg-light);
}

.menu-content h3 {
    margin-bottom: 20px;
    color: var(--text-dark);
}

.menu-action {
    width: 100%;
    background: var(--bg-light);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 500;
    text-align: left;
}

.menu-action:hover {
    background: var(--bg-card);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.menu-action.danger {
    color: var(--danger);
    border-color: var(--danger);
}

.menu-action.danger:hover {
    background: #fef2f2;
}

.action-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.action-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.action-hint {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 400;
    font-style: italic;
}


/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    max-width: 400px;
    margin: 0 auto;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h2 {
    color: var(--text-dark);
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--text-medium);
    margin-bottom: 24px;
}

/* Execution Content */
.execution-content {
    padding: 16px;
}

/* Day Card */
.day-card {
    background: var(--bg-card);
    border-radius: 16px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.day-header {
    background: linear-gradient(135deg, var(--primary) 0%, #2d3e50 100%);
    color: var(--text-white);
    padding: 16px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.day-collapse-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-white);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.day-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.collapse-icon {
    transition: transform 0.3s ease;
}

.collapse-icon.collapsed {
    transform: rotate(-90deg);
}

.day-header-content {
    flex: 1;
    min-width: 0;
}

.day-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.day-cities {
    font-size: 0.875rem;
    opacity: 0.9;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.city-info {
    display: flex;
    align-items: center;
    gap: 4px;
}

.day-progress {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Day Content (Collapsible) */
.day-content {
    max-height: 5000px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.day-content.collapsed {
    max-height: 0;
    opacity: 0;
}

/* Day Highlight */
.day-highlight {
    padding: 16px;
    background: #fef3c7;
    border-left: 3px solid var(--warning);
    font-style: italic;
    color: #92400e;
    font-size: 0.875rem;
}

/* Section */
.section {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-icon {
    font-size: 1rem;
}

/* Activity Item */
.activity-item {
    background: var(--bg-light);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.activity-item.checked {
    background: var(--bg-checked);
    border-color: var(--success);
    opacity: 0.7;
}

.activity-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.activity-checkbox {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 2px solid var(--border-dark);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    margin-top: 2px;
}

.activity-checkbox:hover {
    border-color: var(--accent);
    transform: scale(1.1);
}

.activity-checkbox.checked {
    background: var(--success);
    border-color: var(--success);
}

.activity-checkbox.checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.875rem;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-type {
    font-size: 0.75rem;
    color: var(--text-medium);
    margin-bottom: 4px;
    font-weight: 500;
}

.activity-description {
    color: var(--text-dark);
    font-size: 0.9375rem;
    word-wrap: break-word;
    line-height: 1.5;
}

.activity-item.checked .activity-description {
    text-decoration: line-through;
    color: var(--text-medium);
}

.activity-tag {
    color: rgb(180, 30, 30);
}

.activity-details {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.activity-url, .activity-note {
    font-size: 0.8125rem;
    padding: 6px 10px;
    border-radius: 6px;
    word-wrap: break-word;
}

.activity-url {
    background: #eff6ff;
    color: #1e40af;
}

.activity-url a {
    color: var(--accent);
    text-decoration: none;
    word-break: break-all;
}

.activity-url a:hover {
    text-decoration: underline;
}

.activity-note {
    background: #fef3c7;
    color: #92400e;
    border-left: 2px solid var(--warning);
}

/* Footer Stats */
.footer-stats {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9375rem;
}

.btn-primary {
    background: var(--accent);
    color: var(--text-white);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* Responsive */
@media (min-width: 768px) {
    .container {
        max-width: 768px;
        margin: 0 auto;
    }
    
    .exec-header h1 {
        font-size: 1.5rem;
    }
    
    .execution-content {
        padding: 24px;
    }
    
    .day-card {
        margin-bottom: 24px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 900px;
    }
}

/* Print Styles */
@media print {
    .exec-header,
    .menu-btn,
    .footer-stats,
    .back-link {
        display: none;
    }
    
    .execution-content {
        padding: 0;
    }
    
    .day-card {
        page-break-inside: avoid;
        break-inside: avoid;
    }
}

/* ==========================================
   Language Selector in Execute Menu
   ========================================== */

.menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.menu-header h3 {
    flex: 1;
    margin: 0;
}


.language-selector-exec {
    position: relative;
}

.language-btn-exec {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 600;
    color: #4a5568;
    font-family: inherit;
}

.language-btn-exec:hover {
    border-color: #00a8e8;
    background: #f7fafc;
    color: #00a8e8;
}

.language-dropdown-exec {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: #2a3447;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    min-width: 140px;
    z-index: 1000;
    display: none;
}

.language-dropdown-exec.show,
.language-dropdown-exec.active {
    display: block;
    animation: slideDownExec 0.2s ease;
}

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

.language-dropdown-exec .lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.625rem 1rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.875rem;
    color: #ffffff;
}

.language-dropdown-exec .lang-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.language-dropdown-exec .lang-option:first-child {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.language-dropdown-exec .lang-option:last-child {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.language-dropdown-exec .lang-check {
    color: #00a8e8;
    font-weight: bold;
    visibility: hidden;
    width: 14px;
}

.language-dropdown-exec .lang-option.active .lang-check {
    visibility: visible;
}

/* ============================
   Execute Page Footer
   ============================ */

.execute-footer {
    text-align: center;
    padding: 16px 20px;
    font-size: 0.8rem;
    color: #aaa;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 24px;
}

.execute-footer a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s;
}

.execute-footer a:hover {
    color: #fff;
}

.execute-footer .footer-separator {
    margin: 0 8px;
    opacity: 0.4;
}

