/* Base Styles */
:root {
    --primary-color: #28a745;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-text: #fff;
    --bg-color: #f8f9fa;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --modal-bg: rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Cairo', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    direction: rtl;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Header Styles */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background-color: white;
    box-shadow: 0 2px 5px var(--shadow-color);
    z-index: 10;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Main Content */
.app-main {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.map-container {
    height: 400px;
    width: 100%;
    background-color: #e9ecef;
    visibility: hidden; 
    opacity: 0;
    transition: visibility 0s, opacity 0.5s linear; 
}

.map-container.map-visible {
    visibility: visible; 
    opacity: 1;
}

/* Bottom Control Buttons */
.bottom-controls {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    background-color: white;
    border-radius: 2rem;
    padding: 0.5rem;
    box-shadow: 0 2px 10px var(--shadow-color);
    z-index: 5;
}

.control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.7rem 1rem;
    font-size: 0.8rem;
    color: var(--text-color);
    background: none;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.control-btn i {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.control-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.control-btn:hover:not(.active) {
    background-color: var(--bg-color);
}

/* Button Styles */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.25rem;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background-color: #218838;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-bg);
    z-index: 20;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    font-family: 'Cairo', sans-serif;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.radio-group input[type="radio"] {
    margin-right: 0.5rem;
}

.form-footer {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 350px;
    height: 100%;
    background-color: white;
    box-shadow: -2px 0 5px var(--shadow-color);
    z-index: 15;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.close-sidebar {
    font-size: 1.5rem;
    cursor: pointer;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.filter-controls {
    margin-bottom: 1rem;
}

/* Notes List Styles */
.notes-list {
    list-style: none;
}

.note-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.note-item:hover {
    background-color: var(--bg-color);
}

.note-content h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.note-content p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.note-location {
    font-size: 0.8rem;
    color: #999;
    display: block;
}

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

.btn-complete, .btn-delete {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-complete {
    color: var(--primary-color);
    background-color: rgba(40, 167, 69, 0.1);
}

.btn-delete {
    color: var(--accent-color);
    background-color: rgba(231, 76, 60, 0.1);
}

.note-item.completed {
    opacity: 0.6;
}

.note-item.completed .note-content h3,
.note-item.completed .note-content p {
    text-decoration: line-through;
}

/* Map Markers */
.custom-pin {
    width: 30px;
    height: 30px;
}

.custom-reminder {
    width: 30px;
    height: 30px;


/* Responsive Adjustments */
@media (max-width: 768px) {
    .bottom-controls {
        width: 95%;
    }
    
    .control-btn {
        padding: 0.5rem 0.7rem;
        font-size: 0.7rem;
    }
    
    .control-btn i {
        font-size: 1rem;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .bottom-controls {
        width: 100%;
        border-radius: 0;
        bottom: 0;
        padding: 0.5rem 0;
        justify-content: space-around;
    }
    
    .control-btn {
        padding: 0.4rem 0.5rem;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 0.5rem;
    }
}