/**
 * Custom CSS for eTapGo
 * Extends Django admin styling for custom pages
 */

/* CSS Variables for eTapGo theme */
:root {
    --primary-color: rgb(18, 44, 80);
    --primary-dark: rgb(12, 30, 55);
    --text-color: rgb(18, 44, 80);
    --text-light: #666666;
    --text-lighter: #999999;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e8e8e8;
    
    /* Legacy admin variables */
    --primary: rgb(18, 44, 80);
    --secondary: #79aec8;
    --accent: rgb(18, 44, 80);
    --primary-fg: #fff;
    --body-fg: #333;
    --body-bg: #fff;
    --body-quiet-color: #666;
    --body-loud-color: #000;
    --header-color: #ffc;
    --header-branding-color: var(--accent);
    --header-bg: var(--primary);
    --header-link-color: #fff;
    --breadcrumbs-fg: #c4dce8;
    --breadcrumbs-link-fg: #fff;
    --breadcrumbs-bg: var(--secondary);
    --link-fg: rgb(18, 44, 80);
    --link-hover-color: rgb(12, 30, 55);
    --link-selected-fg: #5b80b2;
    --hairline-color: #e8e8e8;
    --border-color: #ccc;
    --error-fg: #ba2121;
    --message-success-bg: #dfd;
    --message-warning-bg: #ffc;
    --message-error-bg: #ffefef;
    --darkened-bg: #f8f8f8;
    --selected-bg: #e4e4e4;
    --selected-row: #ffc;
    --button-fg: #fff;
    --button-bg: var(--primary);
    --button-hover-bg: var(--primary-dark);
    --default-button-bg: var(--secondary);
    --default-button-hover-bg: var(--primary-dark);
    --close-button-bg: #888;
    --close-button-hover-bg: #747474;
    --delete-button-bg: #ba2121;
    --delete-button-hover-bg: #a41515;
    --object-tools-fg: #fff;
    --object-tools-bg: var(--close-button-bg);
    --object-tools-hover-bg: var(--close-button-hover-bg);
}

body {
    font-family: Calibri, Arial, sans-serif;
}

/* Tab Navigation */
.object-tools .tab-link {
    display: inline-block;
    padding: 8px 12px;
    margin-right: 5px;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: border-color 0.2s;
    color: #417690;
}

.object-tools .tab-link:hover {
    border-bottom-color: #417690;
    color: #205067;
}

.object-tools .tab-link.active {
    border-bottom-color: #417690;
    font-weight: 600;
    color: #205067;
}

.tab-content {
    margin-top: 20px;
}

.tab-pane {
    display: none;
}

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

/* File Upload Area */
.file-upload-area {
    border: 2px dashed #ddd;
    border-radius: 4px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8f8f8;
    margin: 15px 0;
}

.file-upload-area:hover {
    border-color: #417690;
    background: #e8f4f8;
}

.file-upload-area.dragover {
    border-color: #417690;
    background: #cfe2ff;
}

/* Zone Selector Container */
.zone-selector-container {
    position: relative;
    display: inline-block;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: white;
    max-width: 100%;
    margin: 15px 0;
}

.zone-selector-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

.zone-selector-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

/* Zone Configuration Panel */
.zone-config-panel {
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.zone-item {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* Status Tags */
.status-tag {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 3px;
    background: #6c757d;
    color: #fff;
}

.status-tag.status-pending {
    background: #6c757d;
}

.status-tag.status-messaged {
    background: #79aec8;
}

.status-tag.status-delivered {
    background: #5cb85c;
}

.status-tag.status-read {
    background: #ffc107;
    color: #333;
}

.status-tag.status-failed {
    background: #ba2121;
}

.status-tag.status-draft {
    background: #6c757d;
}

.status-tag.status-active {
    background: #5cb85c;
}

.status-tag.status-completed {
    background: #79aec8;
}

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

.stat-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 500;
    color: #417690;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-muted {
    color: #666;
}

.text-danger {
    color: #ba2121;
}

.text-success {
    color: #5cb85c;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .file-upload-area {
        padding: 20px 10px;
    }

    .zone-selector-container {
        width: 100%;
    }
}
