/* Complain Form Styles - MIDC Theme */

/* Terms Status Box */
.terms-status-box {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe8cc 100%);
    border: 2px solid #ffc107;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
}

.terms-status-header {
    font-size: 1.2rem;
    font-weight: 700;
    color: #89287f;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.terms-status-header i {
    font-size: 1.5rem;
    margin-right: 10px;
    color: #ffc107;
}

.terms-status-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.terms-status-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.status-icon {
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-icon.status-pending {
    color: #dc3545;
}

.status-icon.status-accepted {
    color: #28a745;
}

.status-text {
    flex: 1;
}

.status-message {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.terms-action {
    flex-shrink: 0;
}

.terms-action .btn {
    white-space: nowrap;
    font-weight: 600;
}

/* Responsive Terms Box */
@media (max-width: 768px) {
    .terms-status-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .terms-action {
        width: 100%;
    }
    
    .terms-action .btn {
        width: 100%;
    }
    
    .status-icon {
        font-size: 2rem;
    }
    
    .status-message {
        font-size: 1rem;
    }
}

/* Section Title */
.section-title {
    color: #89287f;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #89287f;
    font-size: 1.5rem;
}

.section-title:first-child {
    margin-top: 0;
}

.section-title i {
    margin-right: 10px;
    color: #89287f;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    display: block;
    font-size: 1rem;
}

.form-group label b {
    color: #89287f;
}

/* Form Controls */
.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.form-control:focus {
    border-color: #89287f;
    box-shadow: 0 0 0 0.2rem rgba(137, 40, 127, 0.25);
    outline: none;
}

.form-control:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Select */
select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2389287f' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

/* Textarea */
textarea.form-control {
    resize: vertical;
    min-height: 150px;
    line-height: 1.8;
}

/* Radio Buttons */
.form-check {
    padding: 10px 0;
    margin-bottom: 10px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 3px;
    margin-right: 10px;
    cursor: pointer;
    border: 2px solid #dee2e6;
}

.form-check-input:checked {
    background-color: #89287f;
    border-color: #89287f;
}

.form-check-input:focus {
    border-color: #89287f;
    box-shadow: 0 0 0 0.2rem rgba(137, 40, 127, 0.25);
}

.form-check-input:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.form-check-label {
    cursor: pointer;
    font-size: 1rem;
    color: #555;
    user-select: none;
    line-height: 1.6;
}

.form-check-inline {
    margin-right: 25px;
}

/* File Input */
.form-control-file {
    padding: 12px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    display: block;
    width: 100%;
    transition: all 0.3s ease;
}

.form-control-file:hover:not(:disabled) {
    border-color: #89287f;
    background-color: #f8f9fa;
}

.form-control-file:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.form-control-file::-webkit-file-upload-button {
    background: linear-gradient(135deg, #89287f 0%, #9B4A9D 100%);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 15px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.form-control-file::-webkit-file-upload-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(137, 40, 127, 0.3);
}

.form-control-file:disabled::-webkit-file-upload-button {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Required Indicator */
.text-danger {
    color: #dc3545 !important;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Form Text */
.form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 8px;
    display: block;
}

/* Buttons */
.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ff9800 0%, #ffc107 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
    color: #fff;
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #17a2b8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
    color: #fff;
}

.btn-primary {
    background: linear-gradient(135deg, #89287f 0%, #9B4A9D 100%);
    border: none;
    padding: 14px 45px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(137, 40, 127, 0.3);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(137, 40, 127, 0.4);
    background: linear-gradient(135deg, #9B4A9D 0%, #89287f 100%);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary i,
.btn-warning i,
.btn-info i {
    margin-right: 8px;
}

.btn-lg {
    padding: 14px 50px;
    font-size: 1.15rem;
}

/* reCAPTCHA Container */
.g-recaptcha {
    display: inline-block;
    margin: 15px 0;
}

/* Validation States */
.form-control.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    display: block;
    font-size: 0.875rem;
    color: #dc3545;
    margin-top: 5px;
}

.form-control.is-valid {
    border-color: #28a745;
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid #89287f;
    outline-offset: 2px;
}

/* Custom Scrollbar */
textarea.form-control::-webkit-scrollbar {
    width: 8px;
}

textarea.form-control::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

textarea.form-control::-webkit-scrollbar-thumb {
    background: #89287f;
    border-radius: 10px;
}

textarea.form-control::-webkit-scrollbar-thumb:hover {
    background: #9B4A9D;
}

/* Terms Modal Styling */
#termsModal .modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

#termsModal .modal-header {
    background: linear-gradient(135deg, #89287f 0%, #9B4A9D 100%);
    border-radius: 15px 15px 0 0;
    padding: 25px 30px;
    border-bottom: none;
}

#termsModal .modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
}

#termsModal .modal-title i {
    margin-right: 10px;
}


#termsModal .modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

#termsModal .terms-content {
    color: #2c3e50;
}

#termsModal .term-item {
    display: flex;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #89287f;
    transition: all 0.3s ease;
}

#termsModal .term-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#termsModal .term-number {
    font-size: 1.3rem;
    font-weight: bold;
    color: #89287f;
    min-width: 40px;
    margin-right: 15px;
}

#termsModal .term-text {
    flex: 1;
    line-height: 1.8;
    font-size: 0.95rem;
    text-align: justify;
    color: #555;
}

#termsModal .modal-footer {
    border-top: 2px solid #e9ecef;
    padding: 20px 30px;
    background: #f8f9fa;
    border-radius: 0 0 15px 15px;
}

#termsModal .alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
    border-radius: 10px;
    border-left: 4px solid #17a2b8;
    padding: 15px;
}

#termsModal .alert-info i {
    margin-right: 8px;
}

#termsModal .alert-warning {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
    border-radius: 10px;
    border-left: 4px solid #ffc107;
    padding: 15px;
}

#termsModal .alert-warning i {
    margin-right: 8px;
}

#termsModal .btn-secondary {
    background-color: #6c757d;
    border: none;
    padding: 12px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    color: white;
}

#termsModal .btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

#termsModal .btn-secondary i {
    margin-right: 8px;
}

#termsModal .btn-primary {
    background: linear-gradient(135deg, #89287f 0%, #9B4A9D 100%);
    border: none;
    padding: 12px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(137, 40, 127, 0.3);
}

#termsModal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(137, 40, 127, 0.5);
}

#termsModal .btn-primary i {
    margin-right: 8px;
}

/* Disabled Form Styling */
.form-disabled {
    position: relative;
    opacity: 0.5;
    pointer-events: none;
}

.form-disabled::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
    cursor: not-allowed;
}

/* Scrollbar Styling สำหรับ Modal */
#termsModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#termsModal .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#termsModal .modal-body::-webkit-scrollbar-thumb {
    background: #89287f;
    border-radius: 10px;
}

#termsModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #9B4A9D;
}

/* Responsive */
@media (max-width: 992px) {
    .section-title {
        font-size: 1.3rem;
    }
    
    .form-group label {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    #termsModal .modal-dialog {
        margin: 10px;
    }
    
    #termsModal .modal-body {
        padding: 20px;
        max-height: 50vh;
    }
    
    #termsModal .term-number {
        font-size: 1.1rem;
        min-width: 30px;
    }
    
    #termsModal .term-text {
        font-size: 0.9rem;
    }
    
    #termsModal .btn-lg,
    .btn-lg {
        width: 100%;
        margin-bottom: 10px;
        padding: 12px 30px;
    }
    
    .form-check-inline {
        display: block;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.1rem;
    }
    
    .btn-primary {
        width: 100%;
        padding: 12px 20px;
    }
    
    .terms-status-box {
        padding: 20px 15px;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-box form {
    animation: fadeInUp 0.6s ease-out;
}

.terms-status-box {
    animation: fadeInUp 0.4s ease-out;
}

/* Print Styles */
@media print {
    .btn-primary,
    .g-recaptcha,
    #termsModal,
    .terms-status-box {
        display: none !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .form-control,
    .form-check-input {
        border-width: 3px;
    }
    
    .btn-primary {
        border: 3px solid #ffffff;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
/* Compact form check for 2-column layout */
.form-check-compact {
    padding: 3px 0;
    margin-bottom: 2px;
}

.form-check-compact .form-check-input {
    margin-top: 3px;
}

.form-check-compact .form-check-label {
    line-height: 1.3;
    padding-left: 5px;
}

/* Adjust gender section spacing */
.form-group .form-check {
    padding: 8px 0;
    margin-bottom: 5px;
}