/* Dr. Sergio Medical Consultation Form - Main Styles */

:root {
    --primary-color: #0066cc;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
}

.form-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin: 0 auto;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 20px;
}

.form-header h1 {
    color: var(--primary-color);
    font-size: 32px;
    margin-bottom: 10px;
}

.form-header p {
    color: #666;
    font-size: 16px;
}

.form-section {
    margin-bottom: 30px;
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.form-control {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-control.form-control-sm {
    padding: 6px 10px;
    font-size: 13px;
}

/* Input group styling */
.input-group {
    display: flex;
    gap: 10px;
}

.input-group .form-control {
    flex: 1;
}

.input-group .btn {
    white-space: nowrap;
}

/* Button styling */
.btn {
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #0052a3;
    color: white;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

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

.btn-warning {
    background-color: var(--warning-color);
    color: #333;
}

.btn-warning:hover {
    background-color: #e0a800;
    color: #333;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-outline-danger {
    border: 2px solid var(--danger-color);
    color: var(--danger-color);
    background-color: transparent;
}

.btn-outline-danger:hover {
    background-color: var(--danger-color);
    color: white;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 16px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.w-100 {
    width: 100%;
}

/* Profile card */
.profile-card {
    background: #f8f9fa;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.profile-field {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.profile-field:last-child {
    border-bottom: none;
}

.profile-label {
    font-weight: 600;
    color: #495057;
}

.profile-value {
    color: #212529;
    text-align: right;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    flex: 1;
    min-width: 150px;
}

/* Section styling */
.section-divider {
    margin: 30px 0;
    padding: 20px;
    background: #f0f8ff;
    border-left: 4px solid var(--primary-color);
    border-radius: 6px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.lookup-section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

/* Hidden/Visible sections */
.hidden-section {
    display: none !important;
}

.visible-section {
    display: block;
}

/* Text utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: #6c757d;
}

.small {
    font-size: 12px;
}

small {
    font-size: 12px;
}

/* Margin utilities */
.mb-3 {
    margin-bottom: 20px;
}

.mb-2 {
    margin-bottom: 12px;
}

.mt-2 {
    margin-top: 12px;
}

.mt-3 {
    margin-top: 20px;
}

.p-2 {
    padding: 10px;
}

.p-3 {
    padding: 20px;
}

.px-2 {
    padding-left: 10px;
    padding-right: 10px;
}

.py-2 {
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Flex utilities */
.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-center {
    justify-content: center;
}

.align-items-center {
    align-items: center;
}

.align-items-end {
    align-items: flex-end;
}

.gap-2 {
    gap: 12px;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* Grid utilities */
.row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 15px;
    margin: -7.5px;
}

.col-12 {
    grid-column: span 12;
    padding: 7.5px;
}

.col-md-4 {
    grid-column: span 4;
    padding: 7.5px;
}

.col-md-6 {
    grid-column: span 6;
    padding: 7.5px;
}

.col-md-8 {
    grid-column: span 8;
    padding: 7.5px;
}

/* Responsive */
@media (max-width: 768px) {
    .form-container {
        padding: 20px;
    }

    .form-header h1 {
        font-size: 24px;
    }

    .row {
        grid-template-columns: repeat(6, 1fr);
    }

    .col-md-4 {
        grid-column: span 6;
    }

    .col-md-6 {
        grid-column: span 6;
    }

    .col-md-8 {
        grid-column: span 6;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
    }

    .input-group {
        flex-direction: column;
    }

    .input-group .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 15px;
    }

    .form-header h1 {
        font-size: 20px;
    }

    .row {
        grid-template-columns: 1fr;
    }

    .col-md-4,
    .col-md-6,
    .col-md-8,
    .col-12 {
        grid-column: span 1;
    }

    .profile-field {
        flex-direction: column;
        gap: 5px;
    }

    .profile-value {
        text-align: left;
    }
}

/* Dropzone styling */
.dropzone {
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background-color: #f0f8ff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dropzone:hover {
    background-color: #e3f2fd;
}

.dropzone p {
    margin: 0;
    color: var(--primary-color);
    font-weight: 600;
}

.dropzone small {
    display: block;
    margin-top: 8px;
    color: #666;
}

/* File list styling */
.file-list {
    margin-top: 15px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
}

.file-item span {
    flex: 1;
    color: #333;
}

.file-item .btn-outline-danger {
    margin-left: 10px;
}

/* Background colors */
.bg-light {
    background-color: #f8f9fa;
}

.bg-success {
    background-color: #d4edda;
}

.border {
    border: 1px solid var(--border-color);
}

.rounded {
    border-radius: 6px;
}

/* Textarea styling */
textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Select styling */
select.form-control {
    cursor: pointer;
}

/* Input validation */
.form-control:invalid {
    border-color: var(--danger-color);
}

.form-control:valid {
    border-color: var(--success-color);
}

/* Print styles */
@media print {
    body {
        background: white;
    }

    .form-container {
        box-shadow: none;
        padding: 0;
    }

    .btn {
        display: none;
    }
}
