/* Vet Clinic Profile Plugin Styles */

/* ═══════════════════════════════════════════════════════════════
   FULL-WIDTH BREAKOUT — escape every WordPress theme container
   ═══════════════════════════════════════════════════════════════ */

.vet-clinic-dashboard {
    width: 100vw !important;
    max-width: 100vw !important;
    /* negative margins pull us out of the parent padded container */
    margin-left:  calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    margin-top:    0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    position: relative;
    left: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow-x: hidden;
}

/* Allow parent wrappers to show our overflow rather than clip it */
.entry-content,
.post-content,
.page-content,
.site-content,
.wp-block-group,
.elementor-widget-container,
.fl-module-content,
.container,
.content-area,
.site-main,
main,
article {
    overflow: visible !important;
    max-width: none !important;
}

/* Override any box-sizing inheritance from theme */
.vet-clinic-dashboard *,
.vet-clinic-dashboard *::before,
.vet-clinic-dashboard *::after {
    box-sizing: border-box;
}

/* ═══════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════ */
.vet-clinic-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px 16px;
    margin: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.vet-clinic-header h1 {
    margin: 0 0 6px 0;
    font-size: 22px;
    font-weight: 700;
}

.vet-clinic-header p {
    margin: 0;
    opacity: 0.92;
    font-size: 14px;
}

/* ═══════════════════════════════════════════════
   FORM & GENERATE SECTIONS
   ═══════════════════════════════════════════════ */
.vet-clinic-form-section,
.vet-clinic-generate-section {
    background: white;
    padding: 14px 12px;
    margin: 0 0 4px 0;
    border-bottom: 3px solid #f0f0f0;
    box-shadow: none;
    border-radius: 0;
}

.vet-clinic-form-section h2,
.vet-clinic-generate-section h2 {
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════════════ */
.vet-clinic-form {
    width: 100%;
}

.vet-form-row {
    margin-bottom: 12px;
}

.vet-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.vet-form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.vet-form-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #34495e;
    font-size: 13px;
}

.vet-form-group input[type="text"],
.vet-form-group input[type="email"],
.vet-form-group input[type="tel"],
.vet-form-group input[type="url"],
.vet-form-group textarea,
.vet-form-group select {
    padding: 9px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    font-family: inherit;
    width: 100%;
}

.vet-form-group input:focus,
.vet-form-group textarea:focus,
.vet-form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.vet-form-group textarea {
    resize: vertical;
    min-height: 70px;
}

.vet-form-group small {
    color: #7f8c8d;
    font-size: 12px;
    margin-top: 4px;
    font-style: italic;
}

/* Sub-section dividers */
.vet-form-section {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 2px solid #ecf0f1;
}

.vet-form-section h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════
   LOGO UPLOAD
   ═══════════════════════════════════════════════ */
.logo-upload {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.logo-preview {
    min-width: 90px;
}

.logo-preview img {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 6px;
    background: #f8f9fa;
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
}

/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */
.vet-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    line-height: 1.4;
}

.vet-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.vet-btn:active {
    transform: translateY(0);
}

.vet-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.vet-btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

.vet-btn-secondary {
    background: #95a5a6;
    color: white;
}

.vet-btn-secondary:hover {
    background: #7f8c8d;
}

.vet-btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* ═══════════════════════════════════════════════
   DOCUMENT CARDS
   ═══════════════════════════════════════════════ */
.vet-document-card {
    background: #f5f7ff;
    padding: 14px 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 1px solid #dde3f5;
}

.vet-document-card h3 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 700;
}

.vet-document-card p {
    color: #5a6c7d;
    margin-bottom: 12px;
    font-size: 13px;
}

/* ═══════════════════════════════════════════════
   MESSAGES
   ═══════════════════════════════════════════════ */
.vet-message {
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.vet-success { background: #d4edda; color: #155724; border: 2px solid #c3e6cb; }
.vet-error   { background: #f8d7da; color: #721c24; border: 2px solid #f5c6cb; }
.vet-info    { background: #d1ecf1; color: #0c5460; border: 2px solid #bee5eb; }

/* ═══════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════ */
.vet-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.75);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.vet-modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 0;
    width: 97%;
    max-width: 1100px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    max-height: 92vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

.vet-modal-close {
    color: #999;
    float: right;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    padding: 8px 16px;
    line-height: 1;
    transition: color 0.2s ease;
}

.vet-modal-close:hover { color: #333; }

/* ═══════════════════════════════════════════════
   MULTI-SELECT
   ═══════════════════════════════════════════════ */
select[multiple] {
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    width: 100%;
}

select[multiple]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

select[multiple] option {
    padding: 6px;
    border-radius: 4px;
    margin: 2px 0;
}

select[multiple] option:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* ═══════════════════════════════════════════════
   VET DEGREES
   ═══════════════════════════════════════════════ */
.vet-degrees-container {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.vet-degree-item {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

.vet-degree-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Selects at bottom of casepaper card */
#visitingcard-vet,
#casepaper-vet {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 9px 10px;
    width: 100%;
    margin-bottom: 12px;
    font-size: 14px;
}

/* ═══════════════════════════════════════════════
   LOADING STATE
   ═══════════════════════════════════════════════ */
.vet-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.vet-loading::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 28px; height: 28px;
    margin: -14px 0 0 -14px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ═══════════════════════════════════════════════
   RESPONSIVE — MOBILE
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {

    .vet-clinic-dashboard {
        /* On mobile vw trick may need reinforcement */
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left:  calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
    }

    .vet-clinic-header {
        padding: 14px 10px;
    }

    .vet-clinic-header h1 { font-size: 17px; }
    .vet-clinic-header p  { font-size: 13px; }

    .vet-clinic-form-section,
    .vet-clinic-generate-section {
        padding: 12px 10px;
    }

    .vet-form-grid {
        grid-template-columns: 1fr;
    }

    .logo-upload {
        flex-direction: column;
        align-items: flex-start;
    }

    .vet-btn-group {
        flex-direction: column;
        width: 100%;
    }

    .vet-btn-group .vet-btn {
        width: 100%;
        text-align: center;
    }

    .vet-modal-content {
        width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .vet-document-card {
        padding: 12px 10px;
    }
}

/* ═══════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════ */
@media print {
    .vet-clinic-dashboard,
    .vet-clinic-header,
    .vet-btn,
    .vet-message {
        display: none !important;
    }
}