/* Notes Styles */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    margin-top: 120px !important;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons - Notes specific styles with higher specificity */
.task-form-container .btn,
.task-card .btn,
.tasks-header .btn,
.form-actions .btn,
.task-card-actions .btn,
.task-actions .btn,
.task-view-container .btn {
    display: inline-block !important;
    padding: 0.75rem 1.5rem !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    transition: all 0.3s !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    line-height: 1.5 !important;
    text-align: center !important;
    vertical-align: middle !important;
}

.task-form-container button.btn,
.task-card button.btn,
.tasks-header button.btn,
.form-actions button.btn,
.task-card-actions button.btn,
.task-actions button.btn,
.task-view-container button.btn {
    display: inline-block;
}

.task-form-container .btn-primary,
.task-card .btn-primary,
.tasks-header .btn-primary,
.form-actions .btn-primary,
.task-card-actions .btn-primary,
.task-actions .btn-primary,
.task-view-container .btn-primary {
    background-color: #3498db !important;
    color: white !important;
    border-color: #3498db !important;
}

.task-form-container .btn-primary:hover,
.task-card .btn-primary:hover,
.tasks-header .btn-primary:hover,
.form-actions .btn-primary:hover,
.task-card-actions .btn-primary:hover,
.task-actions .btn-primary:hover,
.task-view-container .btn-primary:hover {
    background-color: #2980b9 !important;
    border-color: #2980b9 !important;
}

.task-form-container .btn-secondary,
.task-card .btn-secondary,
.tasks-header .btn-secondary,
.form-actions .btn-secondary,
.task-card-actions .btn-secondary,
.task-actions .btn-secondary,
.task-view-container .btn-secondary {
    background-color: #95a5a6 !important;
    color: white !important;
    border-color: #95a5a6 !important;
}

.task-form-container .btn-secondary:hover,
.task-card .btn-secondary:hover,
.tasks-header .btn-secondary:hover,
.form-actions .btn-secondary:hover,
.task-card-actions .btn-secondary:hover,
.task-actions .btn-secondary:hover,
.task-view-container .btn-secondary:hover {
    background-color: #7f8c8d !important;
    border-color: #7f8c8d !important;
}

.task-form-container .btn-danger,
.task-card .btn-danger,
.tasks-header .btn-danger,
.form-actions .btn-danger,
.task-card-actions .btn-danger,
.task-actions .btn-danger,
.task-view-container .btn-danger {
    background-color: #e74c3c !important;
    color: white !important;
    border-color: #e74c3c !important;
}

.task-form-container .btn-danger:hover,
.task-card .btn-danger:hover,
.tasks-header .btn-danger:hover,
.form-actions .btn-danger:hover,
.task-card-actions .btn-danger:hover,
.task-actions .btn-danger:hover,
.task-view-container .btn-danger:hover {
    background-color: #c0392b !important;
    border-color: #c0392b !important;
}

.task-form-container .btn-small,
.task-card .btn-small,
.tasks-header .btn-small,
.form-actions .btn-small,
.task-card-actions .btn-small,
.task-actions .btn-small,
.task-view-container .btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Tasks Header */
.tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.tasks-header h1 {
    color: #2c3e50;
    font-size: 2rem;
}

/* Empty State */
.empty-state {
    background: white;
    padding: 3rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.empty-state p {
    color: #666;
    font-size: 1.1rem;
}

/* Tasks Grid */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.task-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.task-title {
    color: #2c3e50;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.task-content {
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.6;
    flex-grow: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.task-card-images {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

.task-card-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.more-images {
    font-size: 0.75rem;
    color: #7f8c8d;
    font-weight: 500;
    margin-left: 0.25rem;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.task-date {
    color: #7f8c8d;
    font-size: 0.875rem;
}

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

/* Task Form */
.task-form-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.task-form-container h1 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.task-form-container h3 {
    color: #2c3e50;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="file"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #7f8c8d;
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Task View */
.task-view-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.task-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.task-view-header h1 {
    color: #2c3e50;
}

.task-actions {
    display: flex;
    gap: 0.5rem;
}

.task-content-view {
    margin-bottom: 2rem;
    line-height: 1.8;
    color: #333;
    font-size: 1.05rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.task-meta-info {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.task-meta-info p {
    margin: 0.5rem 0;
}

/* Images */
.task-images,
.task-images-edit {
    margin-top: 2rem;
}

.task-images h3,
.task-images-edit h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.image-item {
    position: relative;
}

.image-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.image-name {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #7f8c8d;
    word-break: break-all;
}

.add-images-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

/* Floating Action Buttons */
.floating-buttons {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.fab {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s;
    font-size: 1.5rem;
}

.fab:hover {
    background-color: #2980b9;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.fab span {
    line-height: 1;
}

.fab.fab-save {
    background-color: #27ae60;
    border: none;
    cursor: pointer;
}

.fab.fab-save:hover {
    background-color: #229954;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tasks-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .tasks-grid {
        grid-template-columns: 1fr;
    }

    .task-card-actions {
        flex-wrap: wrap;
    }

    .task-view-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .task-actions {
        flex-wrap: wrap;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .floating-buttons {
        bottom: 1rem;
        right: 1rem;
    }

    .fab {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
}
