/* Admin Style for District Awards Registration Plugin */

/* General Admin Styles */
.awards-admin-wrap {
    margin: 20px 20px 0 0;
}

.awards-admin-header {
    margin-bottom: 30px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.awards-admin-header h1 {
    color: #23282d;
    font-size: 32px;
    margin-bottom: 10px;
}

.awards-admin-header h1 .dashicons {
    margin-right: 10px;
    color: #667eea;
}

.awards-admin-header .description {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Import Styles */
.import-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 25px;
}

.import-form-card,
.import-info-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.import-form-card h3,
.import-info-card h3 {
    margin: 0;
    padding: 20px 25px 15px;
    border-bottom: 1px solid #e1e5e9;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
}

.import-form {
    padding: 25px;
}

.upload-area {
    border: 3px dashed #cbd5e0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #f7fafc;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #667eea;
    background: #edf2f7;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #e6fffa;
}

.upload-icon .dashicons {
    font-size: 48px;
    color: #cbd5e0;
    margin-bottom: 15px;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-text {
    font-size: 16px;
    color: #4a5568;
    margin-bottom: 10px;
}

.upload-hint {
    font-size: 14px;
    color: #718096;
}

/* Button Styles */
.button-large {
    height: 40px;
    line-height: 38px;
    padding: 0 20px;
    font-size: 16px;
}

.button-primary.button-large {
    background: #0073aa;
    border-color: #0073aa;
}

.button-primary.button-large:hover {
    background: #005a87;
    border-color: #005a87;
}

/* Table Styles */
.awards-table {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    border-collapse: collapse;
}

.awards-table th,
.awards-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.awards-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #e1e5e9;
}

.awards-table tr:last-child td {
    border-bottom: none;
}

.awards-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.awards-table tr:hover {
    background-color: #e9ecef;
}

/* Status Badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.status-active,
.status-approved {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-inactive,
.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-under-review {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Form Styles */
.awards-form {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.awards-form .form-table th {
    padding: 15px 10px 15px 0;
    width: 200px;
    font-weight: 600;
    vertical-align: top;
}

.awards-form .form-table td {
    padding: 15px 10px;
}

.awards-form input[type="text"],
.awards-form input[type="email"],
.awards-form input[type="password"],
.awards-form select,
.awards-form textarea {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.awards-form input:focus,
.awards-form select:focus,
.awards-form textarea:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

/* Notice Styles */
.awards-notice {
    margin: 15px 0;
    padding: 15px;
    border-radius: 4px;
}

.awards-notice.notice-success {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.awards-notice.notice-error {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.awards-notice.notice-warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.awards-notice.notice-info {
    background-color: #d1ecf1;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

/* Stats Boxes */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    border-top: 4px solid #0073aa;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #2271b1;
    display: block;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* Search and Filter Styles */
.search-box {
    margin-bottom: 20px;
}

.search-box input[type="text"] {
    width: 300px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-box input[type="text"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

/* Bulk Actions */
.bulk-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.bulk-actions select {
    min-width: 150px;
}

.bulk-actions .button {
    margin: 0;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
}

.action-buttons .button-small {
    padding: 2px 8px;
    height: auto;
    line-height: 1.4;
    font-size: 12px;
}

.button-approve {
    color: #155724;
    border-color: #c3e6cb;
    background: #d4edda;
}

.button-approve:hover {
    background: #c3e6cb;
    border-color: #b8dadb;
}

.button-reject {
    color: #721c24;
    border-color: #f5c6cb;
    background: #f8d7da;
}

.button-reject:hover {
    background: #f5c6cb;
    border-color: #ed969e;
}

/* Awards Management Styles */
.awards-structure-container {
    margin-top: 20px;
}

.main-category-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.main-category-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-category-header h3 {
    margin: 0;
    color: #495057;
    font-size: 18px;
}

.main-category-actions {
    display: flex;
    gap: 8px;
}

.sub-categories-container {
    padding: 20px;
}

.sub-category-card {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}

.sub-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sub-category-header h4 {
    margin: 0;
    color: #495057;
    font-size: 16px;
}

.award-count {
    color: #6c757d;
    font-size: 14px;
    font-weight: normal;
}

.sub-category-actions {
    display: flex;
    gap: 5px;
}

.awards-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.award-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.award-name {
    font-weight: 500;
    color: #495057;
}

.award-actions {
    display: flex;
    gap: 3px;
}

.no-sub-categories,
.no-awards {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

.no-sub-categories a,
.no-awards a {
    color: #0073aa;
    text-decoration: none;
}

.no-sub-categories a:hover,
.no-awards a:hover {
    text-decoration: underline;
}

/* Email Settings */
.email-settings {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.email-template-editor {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-top: 10px;
}

.email-template-editor textarea {
    width: 100%;
    min-height: 200px;
    font-family: monospace;
    font-size: 14px;
}

.template-variables {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    margin-top: 10px;
}

.template-variables h4 {
    margin-top: 0;
    color: #495057;
}

.template-variables ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.template-variables li {
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
}

.template-variables li:last-child {
    border-bottom: none;
}

.template-variables code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .import-container {
        grid-template-columns: 1fr;
    }
    
    .stats-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .awards-admin-wrap {
        margin: 10px 10px 0 0;
    }
    
    .awards-admin-header {
        padding: 15px;
    }
    
    .awards-admin-header h1 {
        font-size: 24px;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .stats-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .main-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .sub-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .awards-table {
        font-size: 14px;
    }
    
    .awards-table th,
    .awards-table td {
        padding: 8px 10px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 3px;
    }
    
    .bulk-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .search-box input[type="text"] {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .awards-list {
        grid-template-columns: 1fr;
    }
    
    .award-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .main-category-actions,
    .sub-category-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .main-category-actions .button,
    .sub-category-actions .button {
        font-size: 12px;
        padding: 4px 8px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid #ddd;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.p-20 {
    padding: 20px;
}

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gap-10 {
    gap: 10px;
}

.gap-15 {
    gap: 15px;
}

.gap-20 {
    gap: 20px;
}

/* Custom Scrollbar */
.awards-admin-wrap ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.awards-admin-wrap ::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.awards-admin-wrap ::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.awards-admin-wrap ::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}