/* Eisenhower Matrix Styles */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.hidden {
    display: none;
}

.eisenhower-matrix {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 600px;
}

.eisenhower-quadrant {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    background: #fff;
}

/* Task Styling */
.eisenhower-task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.eisenhower-task-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.task-container {
    display: flex;
    align-items: start;
    gap: 1rem;
    flex: 1;
}

.task-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.eisenhower-task-content {
    flex: 1;
}

/* Task Image Styling */
.task-image-container {
    margin: 8px 0;
    max-width: 200px;
}

.task-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    object-fit: cover;
    cursor: pointer;
}

.task-image:hover {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

.eisenhower-task-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.eisenhower-task-category {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 12px;
    display: inline-block;
}

.eisenhower-task-date {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.eisenhower-task-notes {
    font-size: 0.85rem;
    color: #666;
    white-space: pre-wrap;
}

/* Input File Hidden */
.hidden-file-input {
    display: none;
}

/* Buttons */
.eisenhower-task-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.eisenhower-task-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.eisenhower-task-button:hover {
    background: rgba(0,0,0,0.05);
}

/* Modal */
.eisenhower-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.eisenhower-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
}

.eisenhower-task-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.eisenhower-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.eisenhower-form-group label {
    font-weight: 500;
}

.eisenhower-form-group input,
.eisenhower-form-group textarea,
.eisenhower-form-group select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.eisenhower-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.eisenhower-button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.eisenhower-button-primary {
    background: #007bff;
    color: white;
}

.eisenhower-button-primary:hover {
    background: #0056b3;
}

.eisenhower-button-secondary {
    background: #6c757d;
    color: white;
}

.eisenhower-button-secondary:hover {
    background: #5a6268;
}

/* Storage Section */
.storage-toggle {
    margin: 1rem 0;
}

.storage-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.storage-label {
    font-size: 0.9rem;
    color: #666;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: pointer;
}

/* Progress Bar */
.focus-timer-progress {
    width: 100%;
}

/* Dark Mode */
.eisenhower-dark-mode .eisenhower-quadrant {
    background: #2d2d2d;
    border-color: #404040;
}

.eisenhower-dark-mode .eisenhower-task-item {
    background: #333;
    border-color: #404040;
    color: #fff;
}

.eisenhower-dark-mode .eisenhower-task-category {
    background: #404040;
    color: #bbb;
}

.eisenhower-dark-mode .eisenhower-task-date,
.eisenhower-dark-mode .eisenhower-task-notes {
    color: #bbb;
}

.eisenhower-dark-mode .task-avatar {
    background: #404040;
}

.eisenhower-dark-mode .eisenhower-task-button:hover {
    background: rgba(255,255,255,0.1);
}

/* Drag & Drop */
.sortable-ghost {
    opacity: 0.5;
}

.sortable-chosen {
    background: #e9ecef !important;
}

/* Custom Scrollbar */
.eisenhower-quadrant {
    max-height: calc(50vh - 2rem);
    overflow-y: auto;
}

.eisenhower-quadrant::-webkit-scrollbar {
    width: 6px;
}

.eisenhower-quadrant::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.eisenhower-quadrant::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.eisenhower-quadrant::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Dark Mode Scrollbar */
.eisenhower-dark-mode .eisenhower-quadrant::-webkit-scrollbar-track {
    background: #333;
}

.eisenhower-dark-mode .eisenhower-quadrant::-webkit-scrollbar-thumb {
    background: #666;
}

.eisenhower-dark-mode .eisenhower-quadrant::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* Cross-browser User Select */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Image Preview */
.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    cursor: pointer;
}

.image-preview-container {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    margin: 20px;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    overflow: hidden;
}

.image-preview-container img {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.close-preview {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.close-preview:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Dark Mode Image Preview */
body.eisenhower-dark-mode .image-preview-container {
    background-color: #333;
}

body.eisenhower-dark-mode .close-preview {
    background: rgba(255, 255, 255, 0.2);
}

body.eisenhower-dark-mode .close-preview:hover {
    background-color: rgba(255, 255, 255, 0.3);
}
