/* Main Layout Structure, Sections, Resize Handles - Updated 2025-09-08 */

.app-container {
    display: flex;
    flex: 1;
    background-color: var(--border-color-secondary);
    gap: 1px; /* Reduced gap for thinner separators */
}

.section {
    background-color: var(--bg-color);
    padding: var(--spacing-sm);
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    min-width: 200px;
    position: relative;
    /* contain: layout style paint; - Removed: interferes with drag-and-drop */
}

/* Disable transitions during resize for smooth performance */
.section.resizing {
    transition: none !important;
}

/* Disable all transitions during active resize */
.app-container.resizing * {
    transition: none !important;
}

.notes-section {
    flex: var(--notes-flex);
    width: var(--notes-width);
}

.checklist-section {
    flex: var(--checklist-flex);
    width: var(--checklist-width);
}

.calculator-section {
    flex: var(--calculator-flex);
    width: var(--calculator-width);
    display: flex;
    flex-direction: column;
}

.calculator-container {
    flex: 1;
}

.timer-subsection {
    margin-top: auto;
    padding-top: var(--spacing-sm);
    /* Remove grey border lines */
    flex-shrink: 0;
    min-height: 0;
}

.resize-handle {
    width: 3px;
    background-color: var(--border-color-secondary);
    cursor: col-resize;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    display: block;
    opacity: 0.6;
    will-change: transform, background-color, width;
}

.resize-handle:hover {
    background-color: #007AFF;
    opacity: 1;
    width: 4px;
}

.resize-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 24px;
    background: repeating-linear-gradient(
        to bottom,
        var(--border-color) 0px,
        var(--border-color) 2px,
        transparent 2px,
        transparent 4px
    );
    opacity: 0.4;
    transition: all 0.2s ease;
    border-radius: 1px;
}

.resize-handle:hover::before {
    opacity: 1;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.8) 0px,
        rgba(255, 255, 255, 0.8) 2px,
        transparent 2px,
        transparent 4px
    );
}

/* Expand hit target for better usability */
.resize-handle::after {
    content: '';
    position: absolute;
    top: 0;
    left: -4px;
    right: -4px;
    bottom: 0;
    cursor: col-resize;
    z-index: 1;
}

/* Focus indicator for keyboard accessibility */
.resize-handle:focus {
    outline: 2px solid #007AFF;
    outline-offset: 2px;
    background-color: #007AFF;
    opacity: 1;
}

.resize-handle:focus::before {
    opacity: 1;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.9) 0px,
        rgba(255, 255, 255, 0.9) 2px,
        transparent 2px,
        transparent 4px
    );
}

/* Active state during dragging */
.resize-handle.dragging {
    background-color: #007AFF;
    opacity: 1;
    width: 5px;
    transition: none; /* Disable transitions during drag */
}

.resize-handle.dragging::before {
    opacity: 1;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 1) 0px,
        rgba(255, 255, 255, 1) 2px,
        transparent 2px,
        transparent 4px
    );
}

/* Improved visual feedback during resize */
.app-container.resizing {
    user-select: none;
}

.app-container.resizing .resize-handle:not(.dragging) {
    opacity: 0.3;
}

.section.hidden {
    display: none !important;
    width: 0 !important;
}

.resize-handle.hidden {
    display: none !important;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
    letter-spacing: -0.01em;
}

.notes-section .section-title {
    font-size: 18px;
    font-weight: 600;
}

/* App Footer */
.app-footer {
    margin-top: auto;
    background-color: rgba(var(--bg-color-rgb), 0.95);
    border-top: 1px solid var(--border-color-secondary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    z-index: 100;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--spacing-md);
    height: 48px;
    max-width: 100%;
}

.footer-left {
    flex: 1;
    display: flex;
    align-items: center;
}

.footer-right {
    display: flex;
    align-items: center;
}