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

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* Admin Container */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.admin-sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h1 {
    font-size: 1.5rem;
    margin: 0;
}

.sidebar-nav {
    list-style: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 10px;
    overflow-y: auto; /* Allow scrolling if nav items overflow */
}

.nav-item a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
    font-size: 1.1rem;
    gap: 10px;
    justify-content: flex-start;
}

.nav-item a:hover {
    background-color: #34495e;
}

.nav-item.active a {
    background-color: #3498db;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #2c3e50; /* Match sidebar background */
}

.logout-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s;
}

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

.version-info {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.creator-info {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.creator-info a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.creator-info a:hover {
    color: #3498db;
    text-decoration: underline;
}

/* Main Content Area */
.admin-main {
    flex: 1;
    margin-left: 250px; /* Match sidebar width */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styles */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 900;
}

.header-title h1 {
    font-size: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
}

.admin-label {
    color: #64748b;
    font-weight: 500;
}

/* Content Wrapper */
.content-wrapper {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background-color: #f5f5f5;
}

/* Dashboard Content */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-card {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.welcome-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-box {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-box h4 {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #3498db;
}

/* Icon Styles */
.icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.profile-icon {
    background-image: url('../images/profile.svg');
}

.portfolio-icon {
    background-image: url('../images/portfolio.svg');
}

.messages-icon {
    background-image: url('../images/message.svg');
}

.visitors-icon {
    background-image: url('../images/visitors.svg');
}

.webhook-icon {
    background-image: url('../images/webhook.svg');
}

/* Invert the icon colors to white */
.nav-item a .icon {
    filter: invert(1);
}

/* Messages Page Styles */
.messages-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    padding: 20px;
    max-width: 1400px;
}

.messages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.messages-header h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
}

.messages-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.delete-all-btn {
    padding: 0.5rem 1rem;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.delete-all-btn:hover {
    background-color: #c82333;
}

.filter-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background-color: #e0e0e0;
}

/* Messages Table */
.messages-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

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

.messages-table th {
    background-color: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    white-space: nowrap;
}

.message-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.message-row:hover {
    background-color: #f8f9fa;
}

tr.unread {
    font-weight: 700;
    background-color: #fff;
    border-left: 3px solid #f39c12;
}

tr.unread td:first-child {
    padding-left: 12px;
}

/* Modal Styles */
.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.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #ddd;
    width: 80%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #2c3e50;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 140px);
}

.modal-actions {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #2c3e50;
    text-decoration: none;
}

/* Message Content Styles */
.message-content {
    margin-bottom: 20px;
}

.message-text {
    white-space: pre-wrap;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border-left: 3px solid #3498db;
    margin-top: 10px;
}

/* Message Meta Information */
.message-meta {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #eee;
}

.message-meta h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.2rem;
}

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

.meta-item {
    background-color: white;
    padding: 10px;
    border-radius: 5px;
    border-left: 3px solid #3498db;
}

.meta-item p {
    margin: 0;
}

/* Map Container */
.map-container {
    margin-top: 20px;
}

.map-container h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 1.2rem;
}

.map-frame {
    width: 100%;
    height: 300px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

/* Button Styles */
.unread-btn, .delete-btn {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.unread-btn {
    background-color: #f39c12;
    color: white;
    border: none;
}

.unread-btn:hover {
    background-color: #e67e22;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
    border: none;
}

.delete-btn:hover {
    background-color: #c82333;
}

/* Email Link Style */
.messages-table a {
    color: #3498db;
    text-decoration: none;
}

.messages-table a:hover {
    text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .messages-container {
        margin: 10px;
        padding: 15px;
    }
    
    .messages-table {
        display: block;
        overflow-x: auto;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .meta-grid {
        grid-template-columns: 1fr;
    }
}

.header-link {
    text-decoration: none;
    color: white;
    transition: opacity 0.2s ease;
}

.header-link:hover {
    opacity: 0.9;
}

/* Visitors Page Styles */
.visitors-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    padding: 20px;
    max-width: 1400px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 1px solid #eee;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-title {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-subtitle {
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Visitors List */
.visitors-list {
    margin-top: 30px;
}

.visitors-list h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.visitors-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

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

.visitors-table th {
    background-color: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    white-space: nowrap;
}

.visitor-row {
    transition: background-color 0.2s ease;
}

.visitor-row:hover {
    background-color: #f8f9fa;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .visitors-container {
        margin: 10px;
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .visitors-table {
        display: block;
        overflow-x: auto;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}

/* Recent Visitors Section Styles */
.recent-visitors-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.recent-visitors-section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

/* View Toggle Styles */
.view-toggle {
    display: flex;
    gap: 0;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    overflow: hidden;
}

.view-toggle-btn {
    padding: 8px 16px;
    border: none;
    background: white;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    border-right: 1px solid #e1e1e1;
}

.view-toggle-btn:last-child {
    border-right: none;
}

.view-toggle-btn:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

.view-toggle-btn.active {
    color: #3498db;
    background: #ebf5ff;
}

.view-toggle-btn i {
    font-size: 14px;
}

/* View Content Styles */
.view-content {
    display: none;
}

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

/* Chart View Styles */
#visitors-chart-view {
    height: 500px;
    width: 100%;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#visitorsChart {
    width: 100%;
    height: 100%;
}

/* Table View Styles */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.visitors-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.visitors-table th {
    background-color: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    padding: 16px;
    text-align: left;
    border-bottom: 2px solid #e9ecef;
    font-size: 14px;
}

.visitors-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e9ecef;
    color: #2c3e50;
    font-size: 14px;
}

.visitor-row:hover {
    background-color: #f8f9fa;
}

.no-data-row td {
    padding: 32px !important;
    text-align: center;
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
}

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

.section-header h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
    margin: 0;
}

.view-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #e1e1e1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.time-range-select {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    background: #f8f9fa;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.time-range-select:hover {
    background: #e9ecef;
}

.time-range-select:focus {
    background: #e9ecef;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.what-im-doing-panel {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    cursor: move;
}

.what-im-doing-panel.dragging {
    opacity: 0.6;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
    z-index: 100;
}

.what-im-doing-panel.drag-over {
    border: 2px dashed #3498db;
    background-color: rgba(52, 152, 219, 0.05);
}

.what-im-doing-panel:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.what-im-doing-panel .drag-handle {
    cursor: move;
    margin-right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

/* Remove this problematic rule that makes dragged panels disappear */
/* .what-im-doing-panel.dragging,
.what-im-doing-panel.drag-over,
.skills-section.dragging,
.skills-section.drag-over {
    display: none;
} */

/* Add proper styling for dragged panels */
.what-im-doing-panel.dragging {
    opacity: 0.6;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
    z-index: 100;
}

.what-im-doing-panel .drag-handle {
    cursor: move;
    margin-right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

/* Admin Footer */
.admin-footer {
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 0;
    background-color: transparent;
    z-index: 10;
    pointer-events: none; /* Allow clicks to pass through to elements below */
}

.admin-footer .credit {
    font-size: 13px;
    color: rgba(180, 180, 180, 0.95);
    font-weight: 400;
}

.admin-footer .credit a {
    color: #3498db;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
    pointer-events: auto; /* Make only the link clickable */
}

.admin-footer .credit a:hover {
    color: #2980b9;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .admin-footer {
        width: 100%;
    }
} 