/**
 * Custom CSS for iACore Theme
 * Additional styles and overrides
 * 
 * @package iACore_Theme
 * @version 1.0.0
 */

/* ==========================================================================
   CONTAINER & LAYOUT
   ========================================================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-main {
    min-height: 60vh;
    padding: 40px 0;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    color: #ffffff;
    background-color: #0066cc;
}

.btn-primary:hover {
    background-color: #0052a3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-secondary {
    color: #1a1a1a;
    background-color: #e9ecef;
}

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

.btn-danger {
    color: #ffffff;
    background-color: #dc3545;
}

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

.btn-success {
    color: #ffffff;
    background-color: #28a745;
}

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

/* ==========================================================================
   FORMS
   ========================================================================== */

.iacore-form {
    max-width: 600px;
    margin: 0 auto;
}

.iacore-form-group {
    margin-bottom: 24px;
}

.iacore-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.iacore-form-input,
.iacore-form-select,
.iacore-form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    color: #1a1a1a;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.iacore-form-input:focus,
.iacore-form-select:focus,
.iacore-form-textarea:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.iacore-form-textarea {
    min-height: 120px;
    resize: vertical;
}

.iacore-form-help {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

.iacore-form-error {
    font-size: 12px;
    color: #dc3545;
    margin-top: 4px;
}

/* ==========================================================================
   MESSAGES
   ========================================================================== */

.iacore-message {
    padding: 16px 20px;
    border-radius: 4px;
    margin-bottom: 24px;
}

.iacore-error-message {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.iacore-success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.iacore-info-message {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.iacore-warning-message {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* ==========================================================================
   TABLES
   ========================================================================== */

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

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

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

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

/* ==========================================================================
   BADGES
   ========================================================================== */

.iacore-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
}

.iacore-badge-primary {
    color: #ffffff;
    background-color: #0066cc;
}

.iacore-badge-success {
    color: #ffffff;
    background-color: #28a745;
}

.iacore-badge-danger {
    color: #ffffff;
    background-color: #dc3545;
}

.iacore-badge-warning {
    color: #1a1a1a;
    background-color: #ffc107;
}

.iacore-badge-info {
    color: #ffffff;
    background-color: #17a2b8;
}

/* ==========================================================================
   LOADING SPINNER
   ========================================================================== */

.iacore-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.iacore-loading {
    text-align: center;
    padding: 40px 20px;
}

/* ==========================================================================
   MODAL
   ========================================================================== */

.iacore-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.iacore-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.iacore-modal-content {
    background-color: #ffffff;
    padding: 32px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.iacore-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.iacore-modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.iacore-modal-close {
    font-size: 28px;
    font-weight: 300;
    color: #6c757d;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.iacore-modal-close:hover {
    color: #1a1a1a;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.iacore-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
}

.iacore-pagination a,
.iacore-pagination span {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    color: #1a1a1a;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.iacore-pagination a:hover {
    background-color: #0066cc;
    color: #ffffff;
    border-color: #0066cc;
}

.iacore-pagination .current {
    background-color: #0066cc;
    color: #ffffff;
    border-color: #0066cc;
}

/* ==========================================================================
   RESPONSIVE HELPERS
   ========================================================================== */

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .iacore-modal-content {
        padding: 24px;
        width: 95%;
    }
    
    .iacore-table {
        font-size: 14px;
    }
    
    .iacore-table th,
    .iacore-table td {
        padding: 8px 12px;
    }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .dt-header,
    .dt-scroll-indicator,
    .dt-cta,
    .dt-footer,
    .iacore-button,
    .btn {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
}
