/* File: css/styles.css */
/* Main stylesheet for the application */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1,
h2,
h3,
h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

p {
    margin-bottom: 20px;
}

a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2c3e50;
    color: #fff;
    padding: 15px 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.avatar-img-navbar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 2px solid #eee;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

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

.welcome-text {
    margin-right: 20px;
}

/* Form Styling */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.has-error .form-control {
    border-color: #e74c3c;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
}

.inline-form {
    display: inline;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
    text-decoration: none;
}

.btn-primary {
    background-color: #3498db;
}

.btn-secondary {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: #2ecc71;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 14px;
}

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

.btn-secondary:hover {
    background-color: #95a5a6;
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* Success Message */
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

/* Menu Grid */
.welcome-section {
    text-align: center;
    margin-bottom: 40px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.menu-item {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.menu-item.highlight {
    border-left: 5px solid #3498db;
}

.menu-icon {
    font-size: 36px;
    margin-bottom: 15px;
}

.menu-item h3 {
    margin-bottom: 10px;
}

.menu-item p {
    margin-bottom: 20px;
    color: #666;
}

.menu-item .btn {
    align-self: flex-start;
}

/* Badge */
.badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 3px 10px;
    background-color: #e74c3c;
    color: white;
    border-radius: 20px;
    font-size: 12px;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    color: #7f8c8d;
}

/* Notifications */
.notification-icon {
    position: relative;
    margin-right: 20px;
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.notification-panel {
    position: fixed;
    top: 70px;
    right: 30px;
    width: 350px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
    max-height: 80vh;
    overflow-y: auto;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #7f8c8d;
}

.notification-list {
    padding: 0;
}

.notification-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item.unread {
    background-color: #edf7ff;
}

.notification-content {
    margin-bottom: 5px;
}

.notification-time {
    font-size: 12px;
    color: #7f8c8d;
}

.notification-actions {
    padding: 15px;
    text-align: center;
}

.mark-read-btn {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    margin-top: 5px;
    font-size: 14px;
}

.mark-read-btn:hover {
    text-decoration: underline;
}

.no-notifications {
    padding: 20px;
    text-align: center;
    color: #7f8c8d;
}

.notification-loading {
    padding: 20px;
    text-align: center;
    color: #7f8c8d;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table tr:hover {
    background-color: #f8f9fa;
}

.actions {
    white-space: nowrap;
}

.no-data {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
}

/* Tabs */
.tab-container {
    margin-top: 20px;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab-button {
    padding: 10px 20px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-button:hover {
    background-color: #f8f9fa;
}

.tab-button.active {
    border-bottom-color: #3498db;
    color: #3498db;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #7f8c8d;
}

.close:hover {
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 15px;
    }

    .nav-right {
        margin-top: 15px;
    }

    .welcome-text {
        margin-right: 10px;
    }

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

    .form-control {
        font-size: 14px;
    }

    .notification-panel {
        width: 90%;
        right: 5%;
    }

    .modal-content {
        width: 90%;
        margin: 20% auto;
    }
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    z-index: 9999;
    animation: slideIn 0.3s ease-out, fadeOut 0.5s ease-out 2.5s forwards;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.toast-success {
    background-color: #4caf50;
}

.toast-error {
    background-color: #f44336;
}

.toast-info {
    background-color: #2196f3;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(0,0,0,0.1);
    border-top-color: #2196f3;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Share link styles */
.share-link {
    margin-top: 16px;
    padding: 12px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.link-wrapper {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.link-wrapper input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.link-wrapper button {
    padding: 8px 16px;
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.link-wrapper button:hover {
    background-color: #1976d2;
}

/* User search results improvements */
.user-search-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.user-search-result:hover {
    background-color: #f5f5f5;
}

.user-search-result .user-email {
    color: #666;
    font-size: 12px;
    margin-left: 8px;
}

.add-user-btn {
    padding: 4px 12px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.add-user-btn:hover {
    background-color: #388e3c;
} 