/* * GCA Surgical Database Stylesheet 
 * Theme: Light Theme with Brand Gradient & Custom Fonts
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --gca-primary: #F05142;
    --gca-secondary: #F8983A;
    --gca-gradient: linear-gradient(135deg, #F05142, #F8983A);
    --gca-bg-light: #ffffff;
    --gca-border: #e0e0e0;
    --gca-text-main: #2c3e50;
    --gca-text-muted: #666666;
    --gca-glass-bg: rgba(255, 255, 255, 0.9);
}

/* =========================================
   1. MAIN CONTAINER
========================================= */
.gca-glass-container {
    background: var(--gca-bg-light);
    border: 1px solid var(--gca-border);
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.05);
    max-width: 1200px;
    margin: 20px auto;
    font-family: 'Poppins', Arial, sans-serif;
    color: var(--gca-text-main);
}

.gca-database-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* =========================================
   2. FORM SECTIONS & HEADINGS
========================================= */
.gca-section {
    background: #fafafa;
    border: 1px solid var(--gca-border);
    border-radius: 12px;
    padding: 25px;
    margin: 0;
}

.gca-section legend {
    font-family: 'Urban Rounded', 'Poppins', Arial, sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gca-primary);
    padding: 8px 18px;
    background: #ffffff;
    border: 1px solid var(--gca-border);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.gca-subheading {
    font-family: 'Urban Rounded', 'Poppins', Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gca-primary);
    border-bottom: 2px solid rgba(240, 81, 66, 0.1);
    padding-bottom: 8px;
    margin-top: 25px;
    margin-bottom: 15px;
}

/* =========================================
   3. GRID LAYOUTS 
========================================= */
.gca-grid-1, .gca-grid-2, .gca-grid-3, .gca-grid-4 {
    display: grid;
    gap: 15px 20px;
}

.gca-grid-1 { grid-template-columns: 1fr; }
.gca-grid-2 { grid-template-columns: repeat(2, 1fr); }
.gca-grid-3 { grid-template-columns: repeat(3, 1fr); }
.gca-grid-4 { grid-template-columns: repeat(4, 1fr); }



/* =========================================
   4. INPUTS, SELECTS, & LABELS
========================================= */
.gca-database-form label {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gca-text-muted);
    gap: 6px;
}

.gca-database-form input[type="text"],
.gca-database-form input[type="number"],
.gca-database-form input[type="date"],
.gca-database-form input[type="time"],
.gca-database-form input[type="datetime-local"],
.gca-database-form select,
.gca-database-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    background: #ffffff;
    font-size: 1rem;
    font-family: 'Poppins', Arial, sans-serif;
    color: var(--gca-text-main);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.gca-database-form input:focus,
.gca-database-form select:focus,
.gca-database-form textarea:focus {
    outline: none;
    border-color: var(--gca-primary);
    box-shadow: 0 0 0 3px rgba(240, 81, 66, 0.15);
}

.gca-checkbox-grid {
    display: flex;
    flex-wrap: wrap; /* Allows items to flow to the next line naturally */
    gap: 12px;
    margin-top: 10px;
}

.gca-checkbox-grid label {
    display: inline-flex; /* Activates internal alignment */
    align-items: center;
    gap: 8px; /* Perfect spacing between the checkbox and the text */
    background: #ffffff;
    padding: 10px 14px; /* Slightly wider padding looks better on dynamic widths */
    border-radius: 6px;
    border: 1px solid var(--gca-border);
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap; /* STRICTLY forces text to stay on one line */
    transition: all 0.2s ease;
    margin: 0; /* Resets any default browser margins */
}

/* Optional: Removes annoying default browser margins on the checkbox itself */
.gca-checkbox-grid label input[type="checkbox"] {
    margin: 0;
}

.gca-checkbox-grid label:hover {
    border-color: var(--gca-secondary);
    background: #f9fafb; /* Adds a nice subtle background shift on hover */
}

.gca-database-form input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--gca-primary);
    width: 16px;
    height: 16px;
}

/* =========================================
   5. FOOTER & BUTTONS
========================================= */
.gca-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 2px solid rgba(240, 81, 66, 0.1);
    background: #fafafa;
    padding: 20px;
    border-radius: 10px;
}

.gca-btn-primary {
    background: var(--gca-gradient);
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(240, 81, 66, 0.3);
}

.gca-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(240, 81, 66, 0.4);
}

.gca-btn-primary:active {
    transform: scale(0.97);
}

/* =========================================
   6. MULTI-TAB WIZARD STYLES
========================================= */
.gca-tabs-nav {
    display: flex;
    overflow-x: auto;
    border-bottom: 2px solid var(--gca-border);
    margin-bottom: 25px;
    gap: 5px;
    padding-bottom: 10px;
}

.gca-tab-link {
    background: #ffffff;
    border: 1px solid var(--gca-border);
    border-radius: 8px;
    padding: 10px 15px;
    font-family: 'Poppins', Arial, sans-serif;
    font-weight: 600;
    color: var(--gca-text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.gca-tab-link.active {
    background: var(--gca-gradient);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(240, 81, 66, 0.2);
}

.gca-tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

.gca-tab-pane.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.gca-wizard-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid var(--gca-border);
}

.gca-btn-secondary {
    background: #ffffff;
    color: var(--gca-primary);
    border: 1px solid var(--gca-primary);
    padding: 12px 24px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gca-btn-secondary:hover {
    background: rgba(240, 81, 66, 0.05);
}

/* YES/NO Toggle Buttons */
.gca-toggle-group {
    display: flex;
    background: #f0f0f0;
    border: 1px solid var(--gca-border);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 5px;
}
.gca-toggle-btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-weight: 600;
    font-family: 'Poppins', Arial, sans-serif;
    color: var(--gca-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    border-right: 1px solid var(--gca-border);
}
.gca-toggle-btn:last-child { border-right: none; }
.gca-toggle-btn.active-yes { background: #52c41a; color: white; }
.gca-toggle-btn.active-no { background: var(--gca-primary); color: white; }

/* Responsive Media Queries kept same as before */
@media (max-width: 992px) { .gca-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .gca-glass-container { padding: 20px; margin: 10px; } .gca-section { padding: 15px; } .gca-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .gca-grid-2, .gca-grid-3, .gca-grid-4 { grid-template-columns: 1fr; } .gca-form-footer { flex-direction: column; gap: 15px; text-align: center; } .gca-btn-primary { width: 100%; } }


/* --- Info Icon Styles --- */
.gca-info-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 18px;
    height: 18px;
    background-color: #007cba; /* Standard WordPress/Medical Blue */
    color: #ffffff;
    border-radius: 50%;
    font-size: 12px;
    font-family: serif;
    font-style: italic;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.gca-info-icon:hover {
    background-color: #F05142; /* Changes to your theme red on hover */
    transform: scale(1.15);
}

/* --- Modal Content Styles --- */
.gca-info-modal-content {
    background: #fff;
    width: 90%;
    max-width: 600px;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    margin: 5vh auto; /* Centers it smoothly */
}

/* --- Category Block Styles --- */
.gca-category-block {
    background: #f8f9fa;
    padding: 12px 15px;
    margin-bottom: 12px;
    border-left: 4px solid #007cba;
    border-radius: 0 6px 6px 0;
}

.gca-category-block h5 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 15px;
}

.gca-category-block p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}


/* --- Reference Guide Icon Tab --- */
.gca-tabs-nav {
    display: flex;
    align-items: center;
    gap: 8px; /* Adds consistent spacing between all tabs */
    flex-wrap: wrap; /* Keeps it responsive on smaller screens */
}

.gca-tab-link.gca-icon-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background-color: #007cba; /* A nice distinct blue */
    color: #ffffff;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* When hovered */
.gca-tab-link.gca-icon-tab:hover {
    background-color: #005a87;
    transform: translateY(-2px);
}

/* When actively clicked/open */
.gca-tab-link.gca-icon-tab.active {
    background-color: #F05142; /* Matches your theme's active red color */
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(240, 81, 66, 0.3);
}



/* --- Reference Guide Trigger Button --- */
.gca-reference-trigger-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    background: linear-gradient(135deg, #007cba, #005a87);
    color: #ffffff;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 124, 186, 0.25);
    transition: all 0.2s ease;
}

.gca-reference-trigger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 124, 186, 0.35);
}

/* --- The Modal Overlay (Frosted Glass Effect) --- */
.gca-ref-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(16, 24, 40, 0.6);
    backdrop-filter: blur(4px); /* Beautiful blur effect */
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- The Modal Box --- */
.gca-ref-modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 800px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    animation: gcaModalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes gcaModalPop {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- Modal Header & Body --- */
.gca-ref-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eaecf0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    border-radius: 16px 16px 0 0;
}

.gca-ref-modal-header h3 {
    margin: 0;
    color: #101828;
    font-family: 'Urban Rounded', 'Poppins', sans-serif;
    font-size: 1.25rem;
}

.gca-ref-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #98A2B3;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.gca-ref-close-btn:hover {
    color: #F05142;
}

.gca-ref-modal-body {
    padding: 25px;
    overflow-y: auto;
}

/* --- Category Blocks Inside Modal --- */
.gca-category-block {
    background: #f8f9fa;
    padding: 12px 15px;
    margin-bottom: 12px;
    border-left: 4px solid #007cba;
    border-radius: 0 6px 6px 0;
}

.gca-category-block h5 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 15px;
}

.gca-category-block p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}
