/* Central site styles for ChipPanel */
:root{--theme-color:#007bff}

/* ========================================
   GLOBAL BODY & BASE STYLES
   ======================================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f8fa;
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove link underlines globally */
a, a:visited, a:hover, a:active {
    text-decoration: none;
    color: inherit;
}

/* ========================================
   HEADER STYLES - STANDARDIZED FOR ALL PAGES
   ======================================== */
.admin-header, .user-header, .public-header {
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    background-color: var(--theme-color);
    min-height: 48px;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Header title styling - consistent font size */
.admin-header h2, .user-header h2, .public-header h2 { 
    margin: 0 !important;
    padding: 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
}

/* Header actions container */
.header-actions { 
    display: flex; 
    align-items: center; 
    gap: 12px;
    font-size: 14px;
    margin: 0;
    padding: 0;
}

/* Header link styling */
.header-link { 
    color: white; 
    text-decoration: none; 
    display: flex; 
    align-items: center;
    transition: opacity 0.2s ease;
    margin: 0;
    padding: 0;
}

.header-link:hover {
    opacity: 0.9;
}

/* User balance styling */
.user-balance {
    font-weight: 600;
    font-size: 14px;
}

/* Responsive header styles */
@media (max-width: 768px) {
    .admin-header, .user-header, .public-header {
        flex-direction: column;
        padding: 12px 15px;
        text-align: center;
        min-height: auto;
    }
    
    .header-actions {
        margin-top: 10px;
        flex-wrap: wrap;
        justify-content: center;
        font-size: 13px;
    }
    
    .admin-header h2, .user-header h2, .public-header h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .header-actions {
        gap: 8px;
        font-size: 12px;
    }
}

/* ========================================
   BUTTON STYLES
   ======================================== */
.btn {
    background-color: var(--theme-color);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: filter 0.2s ease;
}

.btn:hover { 
    filter: brightness(0.9); 
}

/* Button-style link used in top action bars */
.btn-link { 
    display:inline-block; 
    padding:8px 14px; 
    background:var(--theme-color); 
    color:#fff; 
    border-radius:6px; 
    text-decoration:none;
}

.btn-link:hover { 
    filter:brightness(0.95);
}

/* ========================================
   CONTAINER & LAYOUT STYLES
   ======================================== */
.container {
    max-width: 1400px;
    margin: 20px auto;
    background: #fff;
    padding: 18px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    box-sizing: border-box;
    overflow-x: auto;
}

/* ========================================
   TABLE STYLES
   ======================================== */
.grid { 
    width: 100%; 
    border-collapse: collapse; 
}

.grid th, .grid td { 
    border: 1px solid #ddd; 
    padding: 8px; 
    text-align: left; 
}

.grid th { 
    background: var(--theme-color); 
    color: white; 
}

.gridview th { 
    background: var(--theme-color); 
    color: white; 
}

/* ========================================
   STATUS & MESSAGE STYLES
   ======================================== */
.status { 
    background-color: #eaf4ff;
    border-left: 5px solid var(--theme-color);
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    color: var(--theme-color);
}

/* ========================================
   BACK LINK STYLES
   ======================================== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    background: var(--theme-color);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    transition: filter 0.2s ease;
}

.back-link:hover {
    filter: brightness(0.92);
}

/* ========================================
   PAGE ACTIONS
   ======================================== */
.page-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

@media (max-width: 768px) {
    .page-actions {
        flex-direction: column;
    }
    
    .container {
        margin: 10px;
        padding: 15px;
    }
}

/* ========================================
   MODAL STYLES
   ======================================== */
.modal-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.5); 
    display: none; 
    justify-content: center; 
    align-items: center; 
    z-index: 1000;
}

.modal { 
    background: #fff; 
    padding: 20px; 
    border-radius: 8px; 
    width: 90%; 
    max-width: 600px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* ========================================
   UTILITIES
   ======================================== */
.row { 
    margin-bottom: 10px;
}

/* Theme picker position */
.theme-picker {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 999;
}

/* Footer */
.site-footer { 
    text-align: center; 
    padding: 12px 20px; 
    color: #666; 
    font-size: 14px;
}

/* Reset any unwanted margins/paddings from ASP.NET controls */
form {
    margin: 0;
    padding: 0;
}

/* Ensure ScriptManager doesn't add extra space */
#ScriptManager, .aspNetHidden {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
}
