/**
 * NexCerebrum Referral Form - PDF STYLE CSS
 * Makes web form look identical to PDF
 * Location: /assets/css/pdf-referral-form.css
 */

/* Main Wrapper */
.pdf-form-wrapper {
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
    background: #fff;
}

/* Alert Messages */
.pdf-form-alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.pdf-form-alert.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.pdf-form-alert.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* PDF Document Container */
.pdf-document {
    background: white;
    border: 2px solid #333;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.4;
}

/* PDF Header */
.pdf-header {
    background: white;
    border-bottom: 2px solid #333;
}

.pdf-header-content {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #ccc;
}

.pdf-logo-section {
    flex: 0 0 200px;
}

.pdf-logo {
    font-size: 24px;
    font-weight: bold;
    color: #006D5C;
    letter-spacing: 1px;
}

.pdf-logo-dot {
    color: #FF6B35;
    font-size: 28px;
}

.pdf-title-section {
    flex: 1;
    text-align: left;
    padding-left: 20px;
}

.pdf-title-section h1 {
    font-size: 16px;
    font-weight: bold;
    color: #006D5C;
    margin: 0;
    line-height: 1.3;
}

.pdf-header-bar {
    background: #D17A3F;
    color: white;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
}

.pdf-contact-bar {
    background: #f5f5f5;
    padding: 6px 20px;
    font-size: 11px;
    text-align: center;
    border-bottom: 1px solid #ccc;
}

.pdf-contact-bar span {
    margin: 0 5px;
}

.pdf-subtitle {
    padding: 10px 20px;
    font-size: 11px;
    text-align: center;
    background: #fff;
    border-bottom: 1px solid #ccc;
}

/* PDF Sections */
.pdf-section {
    padding: 15px 20px;
    border-bottom: 1px solid #ccc;
}

.pdf-section-title {
    font-weight: bold;
    color: #006D5C;
    font-size: 13px;
    margin-bottom: 12px;
    border-bottom: 2px solid #006D5C;
    padding-bottom: 3px;
}

.pdf-note {
    font-weight: normal;
    font-style: italic;
    font-size: 11px;
    color: #666;
}

/* Form Rows and Fields */
.pdf-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.pdf-field {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pdf-field-large {
    flex: 2;
}

.pdf-field-medium {
    flex: 1;
}

.pdf-field-small {
    flex: 0.7;
}

.pdf-field label {
    font-size: 11px;
    font-weight: bold;
    color: #333;
    margin-bottom: 3px;
}

.pdf-field input[type="text"],
.pdf-field input[type="email"],
.pdf-field input[type="tel"],
.pdf-field input[type="date"] {
    padding: 4px 6px;
    border: 1px solid #666;
    border-radius: 0;
    font-size: 11px;
    font-family: Arial, sans-serif;
    background: white;
}

.pdf-field input:focus {
    outline: 2px solid #006D5C;
    outline-offset: 0;
}

/* Textarea */
.pdf-section textarea {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #666;
    border-radius: 0;
    font-size: 11px;
    font-family: Arial, sans-serif;
    resize: vertical;
    min-height: 60px;
}

.pdf-section textarea:focus {
    outline: 2px solid #006D5C;
    outline-offset: 0;
}

/* Two Column Layout */
.pdf-two-columns {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #ccc;
}

.pdf-column {
    flex: 1;
    border-right: 1px solid #ccc;
}

.pdf-column:last-child {
    border-right: none;
}

.pdf-column .pdf-section {
    border-bottom: none;
}

/* Custom Checkboxes */
.pdf-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pdf-checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 3px 0;
    margin: 0;
    font-size: 11px;
    position: relative;
}

.pdf-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    flex-shrink: 0;
    height: 14px;
    width: 14px;
    border: 1px solid #333;
    background-color: white;
    margin-right: 6px;
    margin-top: 1px;
    position: relative;
}

.pdf-checkbox input:checked ~ .checkmark {
    background-color: white;
}

.pdf-checkbox input:checked ~ .checkmark:after {
    content: "✓";
    position: absolute;
    left: 2px;
    top: -2px;
    font-size: 13px;
    font-weight: bold;
    color: #000;
}

.checkbox-text {
    flex: 1;
    line-height: 1.4;
}

/* Inline Inputs in Checkboxes */
.inline-input {
    border: none;
    border-bottom: 1px solid #666;
    padding: 0 4px;
    margin: 0 4px;
    width: 120px;
    font-size: 11px;
    font-family: Arial, sans-serif;
    background: transparent;
}

.inline-input:focus {
    outline: none;
    border-bottom: 2px solid #006D5C;
}

/* Checkbox Row (for horizontal layout) */
.pdf-checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.pdf-checkbox-row .pdf-checkbox {
    flex: 0 0 auto;
    min-width: 200px;
}

/* Submit Section */
.pdf-submit-section {
    padding: 20px;
    text-align: center;
    background: #f9f9f9;
    border-bottom: 1px solid #ccc;
}

.pdf-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.pdf-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.pdf-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.pdf-submit-btn svg {
    width: 18px;
    height: 18px;
}

/* PDF Footer */
.pdf-footer {
    padding: 12px 20px;
    text-align: center;
    font-size: 11px;
    background: #f9f9f9;
    color: #666;
}

.pdf-footer p {
    margin: 3px 0;
}

/* Required Field Indicator */
.required {
    color: #dc3545;
    font-weight: bold;
}

/* Loading Spinner */
.pdf-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: pdf-spin 0.8s linear infinite;
}

@keyframes pdf-spin {
    to { 
        transform: rotate(360deg); 
    }
}

/* Responsive Design - Tablet */
@media (max-width: 768px) {
    .pdf-form-wrapper {
        padding: 10px;
        margin: 15px auto;
    }

    .pdf-document {
        border-width: 1px;
    }

    .pdf-header-content {
        flex-direction: column;
        text-align: center;
    }

    .pdf-logo-section {
        flex: none;
        margin-bottom: 10px;
    }

    .pdf-title-section {
        padding-left: 0;
    }

    .pdf-title-section h1 {
        font-size: 14px;
    }

    .pdf-form-row {
        flex-direction: column;
        gap: 10px;
    }

    .pdf-field-large,
    .pdf-field-medium,
    .pdf-field-small {
        flex: 1;
    }

    .pdf-two-columns {
        flex-direction: column;
    }

    .pdf-column {
        border-right: none;
        border-bottom: 1px solid #ccc;
    }

    .pdf-column:last-child {
        border-bottom: none;
    }

    .pdf-checkbox-row {
        flex-direction: column;
        gap: 6px;
    }

    .pdf-checkbox-row .pdf-checkbox {
        min-width: auto;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 480px) {
    .pdf-form-wrapper {
        padding: 5px;
        margin: 10px auto;
    }

    .pdf-section {
        padding: 12px 15px;
    }

    .pdf-header-content {
        padding: 12px 15px;
    }

    .pdf-header-bar {
        padding: 6px 15px;
        font-size: 12px;
    }

    .pdf-contact-bar {
        font-size: 10px;
        padding: 5px 10px;
    }

    .pdf-logo {
        font-size: 20px;
    }

    .pdf-title-section h1 {
        font-size: 13px;
    }

    .pdf-section-title {
        font-size: 12px;
    }

    .pdf-field label,
    .checkbox-text,
    .pdf-note {
        font-size: 10px;
    }

    .inline-input {
        width: 80px;
    }

    .pdf-submit-btn {
        width: 100%;
        padding: 12px 20px;
    }
}

/* Print Styles */
@media print {
    .pdf-form-wrapper {
        margin: 0;
        padding: 0;
    }

    .pdf-submit-section,
    .pdf-form-alert {
        display: none;
    }

    .pdf-document {
        border: 1px solid #333;
    }

    .pdf-submit-btn {
        display: none;
    }
}

/* Accessibility */
.pdf-field input:focus,
.pdf-section textarea:focus,
.inline-input:focus {
    outline: 2px solid #006D5C;
    outline-offset: 1px;
}

.pdf-submit-btn:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.pdf-checkbox:focus-within .checkmark {
    outline: 2px solid #006D5C;
    outline-offset: 1px;
}