/* Main container styles */
.main-container {
    background: #ffffff;
    min-height: 100vh;
    padding: 1rem 0;
    width: 100%;
}
@media (min-width: 768px) {
    .main-container {
        padding: 2rem 0;
    }
}

/* Header styles */
.header-container {
    flex-direction: column;
    gap: 1rem;
}
@media (min-width: 768px) {
    .header-container {
        flex-direction: row;
        gap: 0;
    }
}

/* Content card styles - no longer used */
/*
.content-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1rem;
    margin: 0 auto;
    width: 100%;
    max-width: none;
}
@media (min-width: 768px) {
    .content-card {
        padding: 2rem;
    }
}
*/

/* Video container styles */
.video-container {
    background: #000000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
    position: relative;
}

/* WMV warning styles */
#wmvWarning {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

#wmvWarning strong {
    font-weight: 600;
}

/* WMV badge styles */
.wmv-badge {
    display: inline-block;
    background-color: #3b82f6;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}
@media (min-width: 768px) {
    .video-container {
        margin-bottom: 2rem;
    }
}

video {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
}

/* Video item styles */
.video-item {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}
@media (min-width: 768px) {
    .video-item {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }
}

.video-item:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.video-item:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.video-item.active {
    /* background-color: #f3f4f6; */
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
}

/* Button styles */
.logout-btn {
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #374151;
}
@media (min-width: 768px) {
    .logout-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

.logout-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.download-btn {
    transition: all 0.2s ease;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #374151;
    border-radius: 6px;
    font-weight: 500;
    white-space: nowrap;
}
@media (min-width: 768px) {
    .download-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

.download-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.download-btn:active {
    transform: translateY(0);
}

/* shadcn-style button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.title {
    font-size: 1.5rem;
    text-align: center;
}
@media (min-width: 768px) {
    .title {
        font-size: 1.875rem;
        text-align: left;
    }
}

/* Password page title - always centered */
.password-title {
    font-size: 1.5rem;
    text-align: center;
}
@media (min-width: 768px) {
    .password-title {
        font-size: 1.875rem;
        text-align: center;
    }
}

/* Video list styles */
.video-list-title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: #111827;
    font-weight: 600;
}
@media (min-width: 768px) {
    .video-list-title {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }
}

.video-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
@media (min-width: 768px) {
    .video-info {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
    }
}

.video-name {
    font-weight: 500;
    color: #111827;
    word-break: break-word;
}

.video-size {
    font-size: 0.75rem;
    color: #6b7280;
}
@media (min-width: 768px) {
    .video-size {
        font-size: 0.875rem;
    }
}

.video-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Mobile-specific improvements */
@media (max-width: 767px) {
    .video-item {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    video {
        max-height: 50vh;
    }
    
    /* .content-card {
        margin: 0 0.5rem;
        border-radius: 8px;
    } */
}

/* Loading state */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: #6b7280;
}

/* Error state */
.error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
}

/* Password prompt specific styles */
.password-container {
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.password-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    width: 100%;
    max-width: 400px;
}
@media (min-width: 768px) {
    .password-card {
        padding: 2rem;
    }
}

.password-input {
    transition: all 0.2s ease;
    font-size: 16px; /* Prevents zoom on iOS */
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
}
.password-input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
}

.subtitle {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: #6b7280;
}
@media (min-width: 768px) {
    .subtitle {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
}

.video-notice {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    color: #3b82f6;
}
@media (min-width: 768px) {
    .video-notice {
        font-size: 0.875rem;
        margin-top: 0.75rem;
    }
}

.submit-btn {
    transition: all 0.2s ease;
    font-size: 16px; /* Prevents zoom on iOS */
    background: #111827;
    color: #ffffff;
    border: 1px solid #111827;
    border-radius: 6px;
    font-weight: 500;
}
.submit-btn:hover {
    background: #374151;
    border-color: #374151;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.submit-btn:active {
    transform: translateY(0);
}
.submit-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.error-message {
    font-size: 0.875rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 6px;
}
@media (min-width: 768px) {
    .error-message {
        font-size: 1rem;
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
}

.footer-text {
    font-size: 0.75rem;
    margin-top: 1rem;
    color: #6b7280;
}
@media (min-width: 768px) {
    .footer-text {
        font-size: 0.875rem;
        margin-top: 1.5rem;
    }
}

/* Mobile-specific improvements for password prompt */
@media (max-width: 767px) {
    .password-container {
        padding: 0.5rem;
    }
    
    .password-card {
        border-radius: 8px;
        margin: 0 0.5rem;
    }
    
    /* Prevent zoom on input focus */
    input[type="password"] {
        font-size: 16px;
    }
    
    /* Better touch targets */
    button {
        min-height: 44px;
    }
}

/* Loading state for form submission */
.form-loading {
    opacity: 0.7;
    pointer-events: none;
    /* Override the general loading class to maintain form layout */
    display: block !important;
    justify-content: unset !important;
    align-items: unset !important;
    padding: unset !important;
    color: unset !important;
}

.form-loading .submit-btn {
    position: relative;
}

.form-loading .submit-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* shadcn-style form elements */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
}

/* Campaign item styles */
.campaign-item {
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.campaign-header {
    cursor: pointer;
    padding: 1rem;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    position: relative;
}

.campaign-header:hover {
    background: #f9fafb;
}

.campaign-header.active {
    border-left: 4px solid #3b82f6;
    background: #eff6ff;
}

.campaign-header.active:hover {
    background: #dbeafe;
}

.campaign-info {
    flex: 1;
}

.campaign-title {
    font-weight: 600;
    color: #111827;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.campaign-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.campaign-date {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 0.25rem;
    font-style: italic;
}

.video-count {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
}

.dropdown-arrow {
    width: 24px;
    height: 24px;
    background-image: url('/static/images/icons8-drop-down-24.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease;
}

.dropdown-arrow.expanded {
    transform: rotate(180deg);
}

.campaign-videos {
    display: none;
    background: #ffffff;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.campaign-videos.show {
    display: block;
    max-height: 1000px; /* Adjust based on your content */
}

/* Dropdown video item styles */
.dropdown-video-item {
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
}

.dropdown-video-item:last-child {
    border-bottom: none;
}

.dropdown-video-item:hover {
    background-color: #f9fafb;
}

.dropdown-video-item.active {
    background-color: #eff6ff;
    border-left: 3px solid #3b82f6;
}

.dropdown-video-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.dropdown-video-name {
    flex: 1;
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
}

.dropdown-video-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.download-btn.small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Campaign info in single video items */
.video-info .campaign-info {
    margin-bottom: 0.5rem;
}

.video-info .campaign-title {
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
}

.video-info .campaign-subtitle {
    font-size: 0.75rem;
    margin-bottom: 0;
}

/* YouTube-like layout */
.youtube-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    width: 100%;
}

.left-column {
    flex: 2;
    max-width: 70%;
    position: sticky;
    top: 1rem;
}

.right-column {
    flex: 1;
    max-width: 30%;
    min-height: 70vh;
}

.calendar-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* Video list in right column */
.right-column .video-list {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding-right: 0.5rem;
}

.right-column .video-list::-webkit-scrollbar {
    width: 6px;
}

.right-column .video-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.right-column .video-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.right-column .video-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Mobile responsive */
@media (max-width: 1024px) {
    .youtube-layout {
        flex-direction: column;
        gap: 1rem;
    }
    
    .left-column {
        max-width: 100%;
        position: static;
        width: 100%;
    }
    
    .right-column {
        max-width: 100%;
        min-height: auto;
        width: 100%;
    }
    
    .right-column .video-list {
        max-height: 50vh;
    }
    
    .calendar-section {
        width: 100%;
        margin-top: 1rem;
    }
    
    .video-container {
        width: 100%;
        margin-bottom: 1rem;
    }
}

/* Date Range Picker Styles */
.date-range-picker {
    position: relative;
    display: inline-block;
    width: 100%;
}

.calendar-popup {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    margin-top: 4px;
    min-width: 280px;
}

.calendar-popup.hidden {
    display: none;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 8px 8px 0 0;
}

.calendar-nav-btn {
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.calendar-nav-btn:hover {
    background-color: #e5e7eb;
}

#current-month {
    font-weight: 600;
    color: #111827;
    font-size: 14px;
}

.calendar-grid {
    padding: 16px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.calendar-weekdays div {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    padding: 8px 4px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.calendar-day:hover {
    background-color: #f3f4f6;
}

.calendar-day.other-month {
    color: #d1d5db;
    cursor: default;
}

.calendar-day.other-month:hover {
    background-color: transparent;
}

.calendar-day.selected {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.calendar-day.in-range {
    background-color: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.calendar-day.range-start {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.calendar-day.range-end {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.calendar-footer {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0 0 8px 8px;
}

.calendar-footer .btn {
    flex: 1;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-footer .btn.primary {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.calendar-footer .btn.primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

.calendar-footer .btn.secondary {
    background-color: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.calendar-footer .btn.secondary:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

.cursor-pointer {
    cursor: pointer;
}

.calendar-day.disabled {
    color: #d1d5db;
    background-color: #f9fafb;
    cursor: not-allowed;
    opacity: 0.5;
}

.calendar-day.disabled:hover {
    background-color: #f9fafb;
    transform: none;
    box-shadow: none;
} 