/**
 * Medical Assessment Form - Frontend Styles
 * Modern design with teal/turquoise color scheme
 */

/* Container */
.bdma-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Progress Bar */
.bdma-progress-wrapper {
    margin-bottom: 35px;
}

.bdma-progress-bar {
    width: 100%;
    height: 10px;
    background: #e8f5f3;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.bdma-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4db8a4, #5ac8b4);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(77, 184, 164, 0.3);
}

.bdma-progress-text {
    text-align: center;
    font-size: 15px;
    color: #4db8a4;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Sections */
.bdma-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.bdma-section-active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bdma-section-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 30px;
    padding-bottom: 18px;
    border-bottom: 3px solid #4db8a4;
    position: relative;
}

.bdma-section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 80px;
    height: 3px;
    background: #5ac8b4;
    border-radius: 2px;
}

/* Grid Layouts */
.bdma-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 24px;
}

.bdma-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Form Fields */
.bdma-field {
    margin-bottom: 24px;
}

.bdma-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.bdma-label.bdma-required::after {
    content: " *";
    color: #e74c3c;
}

.bdma-required-mark {
    color: #e74c3c;
    margin-left: 4px;
}

.bdma-question-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #4db8a4, #5ac8b4);
    color: white;
    border-radius: 50%;
    font-size: 13px;
    font-weight: bold;
    margin-right: 10px;
    box-shadow: 0 2px 6px rgba(77, 184, 164, 0.3);
}

/* Input Fields */
.bdma-input,
.bdma-textarea {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    border: 2px solid #e0e7e9;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    background: #fafbfc;
    color: #2c3e50;
}

.bdma-input:hover,
.bdma-textarea:hover {
    border-color: #b8d4d0;
    background: #ffffff;
}

.bdma-input:focus,
.bdma-textarea:focus {
    outline: none;
    border-color: #4db8a4;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(77, 184, 164, 0.1), 0 4px 12px rgba(77, 184, 164, 0.15);
    transform: translateY(-1px);
}

.bdma-input-error {
    border-color: #e74c3c !important;
    background: #fff5f5 !important;
}

.bdma-field-error {
    border-left: 4px solid #e74c3c;
    padding-left: 12px;
    background: #fff5f5;
    border-radius: 8px;
    padding: 12px;
}

.bdma-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.bdma-signature {
    font-family: 'Brush Script MT', cursive;
    font-size: 18px;
}

/* Conditional Other Input Fields */
.bdma-other-input {
    display: none;
    margin-top: 12px;
    animation: slideDown 0.3s ease;
}

.bdma-other-input.bdma-show {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Radio and Checkbox Groups */
.bdma-radio-group,
.bdma-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bdma-radio-grid-2,
.bdma-checkbox-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.bdma-radio-label,
.bdma-checkbox-label {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.bdma-radio-label:hover,
.bdma-checkbox-label:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.bdma-radio-label input[type="radio"],
.bdma-checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.bdma-radio-label input[type="radio"]:checked+span,
.bdma-checkbox-label input[type="checkbox"]:checked+span {
    font-weight: 600;
    color: #2c3e50;
}

/* Consent Section */
.bdma-consent-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.bdma-consent-label {
    border: none;
    padding: 15px 0;
    background: transparent;
}

.bdma-consent-label:hover {
    background: transparent;
}

.bdma-consent-text {
    line-height: 1.6;
    color: #34495e;
}

/* Navigation Buttons */
.bdma-navigation {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 2px solid #e8f5f3;
}

.bdma-btn {
    padding: 16px 36px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bdma-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.bdma-btn-primary {
    background: linear-gradient(135deg, #4db8a4, #5ac8b4);
    color: white;
}

.bdma-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #45a896, #52b9a6);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(77, 184, 164, 0.4);
}

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

.bdma-btn-secondary:hover:not(:disabled) {
    background: #7f8c8d;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(149, 165, 166, 0.3);
}

.bdma-btn-success {
    background: linear-gradient(135deg, #4db8a4, #5ac8b4);
    color: white;
    flex: 1;
}

.bdma-btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #45a896, #52b9a6);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(77, 184, 164, 0.4);
}

/* Messages */
.bdma-messages {
    margin-top: 20px;
}

.bdma-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.5;
}

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

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

/* Utility Classes */
.bdma-mt-2 {
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bdma-container {
        padding: 15px;
        border-radius: 0;
    }

    .bdma-section-title {
        font-size: 20px;
    }

    .bdma-grid-2 {
        grid-template-columns: 1fr;
    }

    .bdma-radio-grid-2,
    .bdma-checkbox-grid-2 {
        grid-template-columns: 1fr;
    }

    .bdma-navigation {
        flex-direction: column;
    }

    .bdma-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .bdma-section-title {
        font-size: 18px;
    }

    .bdma-input,
    .bdma-textarea {
        font-size: 14px;
        padding: 10px 12px;
    }

    .bdma-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Print Styles */
@media print {

    .bdma-navigation,
    .bdma-progress-wrapper {
        display: none;
    }

    .bdma-section {
        display: block !important;
        page-break-inside: avoid;
    }
}