/* ============================================================================
   CONSENT MANAGEMENT STYLES - RURAL INFRATEL
   Matches exact layout, colors, and badge styling from reference design
   ============================================================================ */

/* Bootstrap Modal Stacking & Backdrop Fixes:
   Ensures modal dialogs are ALWAYS crisp white and on top of backdrop overlays */
.modal-backdrop {
    z-index: 1040 !important;
}

.modal.consent-modal-custom,
#getConsentOtpModal,
#withdrawConsentModal {
    z-index: 1060 !important;
}

.modal.consent-modal-custom .modal-dialog,
#getConsentOtpModal .modal-dialog,
#withdrawConsentModal .modal-dialog {
    z-index: 1065 !important;
    position: relative;
}

/* Modal Base Styling */
.consent-modal-custom .modal-content {
    border-radius: 14px !important;
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2) !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    position: relative;
    z-index: 1070 !important;
}

.consent-modal-close {
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 1050;
    font-size: 28px;
    font-weight: 300;
    color: #6b7280;
    opacity: 0.8;
    transition: color 0.2s;
    background: transparent;
    border: none;
    outline: none !important;
}

.consent-modal-close:hover {
    color: #111827;
    opacity: 1;
}

/* Shield Icon at Top */
.consent-shield-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #e6f7ef;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #bbf7d0;
}

.consent-shield-icon {
    width: 28px;
    height: 28px;
    color: #00a658;
}

.consent-modal-title {
    font-size: 24px;
    color: #111827;
    letter-spacing: -0.3px;
    font-weight: 700;
}

/* Two-Step Progress Indicator */
.consent-stepper {
    gap: 12px;
}

.consent-stepper .step-item {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.consent-stepper .step-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #9ca3af;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-right: 8px;
}

.consent-stepper .step-item.active {
    color: #00a658;
    font-weight: 600;
}

.consent-stepper .step-item.active .step-badge {
    background-color: #00a658;
}

.consent-stepper .step-item.completed .step-badge {
    background-color: #00a658;
}

.consent-stepper .step-line {
    width: 50px;
    height: 2px;
    background-color: #d1d5db;
}

.consent-stepper .step-line.active {
    background-color: #00a658;
}

/* Form Controls */
.consent-form-label {
    font-size: 13.5px;
    color: #1f2937;
    margin-bottom: 6px;
}

.consent-input,
.consent-textarea {
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    padding: 10px 14px;
    font-size: 14px;
    color: #111827;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.consent-input:focus,
.consent-textarea:focus {
    border-color: #00a658 !important;
    box-shadow: 0 0 0 3px rgba(0, 166, 88, 0.15) !important;
    outline: none;
}

.consent-textarea {
    resize: vertical;
    min-height: 75px;
}

.consent-otp-input {
    width: 220px !important;
    height: 48px;
    font-size: 26px !important;
    letter-spacing: 8px;
    border: 1.5px solid #00a658 !important;
    border-radius: 8px !important;
    background-color: #f9fdfa;
}

/* Blue Panel: Consent Details Found */
.consent-details-panel {
    background-color: #e8f4fd;
    border: 1px solid #c7e5fc;
    border-radius: 10px;
    padding: 16px 18px;
}

.consent-info-icon-col .consent-info-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #0284c7;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.consent-panel-heading {
    color: #0369a1;
    font-size: 15px;
}

.consent-panel-sub {
    color: #475569;
}

.consent-info-white-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.border-right-md {
    border-right: 1px solid #e2e8f0;
}

@media (max-width: 767.98px) {
    .border-right-md {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }
}

.badge-success-soft {
    background-color: #d1fae5;
    color: #065f46;
    border-radius: 20px;
    font-size: 12px;
}

/* Green Panel: Purpose of Consent */
.consent-purpose-panel {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 16px 18px;
}

.consent-purpose-icon-col .consent-purpose-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #16a34a;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.consent-purpose-heading {
    color: #15803d;
    font-size: 15px;
}

/* Yellow Panel: Please Note Warning */
.consent-warning-panel {
    background-color: #fef9c3;
    border: 1px solid #fef08a;
    border-radius: 10px;
    padding: 16px 18px;
}

.consent-warning-icon-col .consent-warning-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #f59e0b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.consent-warning-heading {
    color: #92400e;
    font-size: 15px;
}

.consent-warning-list {
    color: #451a03;
    font-size: 13px;
    line-height: 1.55;
}

.consent-warning-list li {
    margin-bottom: 4px;
}

/* Custom Primary Button */
.btn-success-custom {
    background-color: #00a658;
    border-color: #00a658;
    color: #ffffff;
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.btn-success-custom:hover,
.btn-success-custom:focus {
    background-color: #008345;
    border-color: #008345;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 166, 88, 0.25);
}

.btn-success-custom:disabled {
    background-color: #93c5aa;
    border-color: #93c5aa;
    color: #ffffff;
    cursor: not-allowed;
}

/* Success Screen Animation & Icons */
.consent-success-icon-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: #e6f7ef;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #bbf7d0;
}

.consent-success-svg {
    width: 36px;
    height: 36px;
    color: #00a658;
}

/* Contact Us Section Consent Integration */
.contact-consent-container {
    background: #fbfcfd;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 14px;
    margin-top: 6px;
    margin-bottom: 16px;
}

.contact-consent-container.consent-verified {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.consent-badge-active {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    background-color: #d1fae5;
    color: #065f46;
    font-size: 11px;
    font-weight: 600;
}

/* Footer Link */
.footer-consent-link,
.footer-privacy-link {
    transition: color 0.2s;
    text-decoration: underline;
}

.footer-consent-link:hover,
.footer-privacy-link:hover {
    color: #ffffff !important;
}

/* Privacy Policy Document - Section Spacing Fix */
/* Overrides the template's global 'section { padding: 60px 0 }' which caused large gaps between policy sections */
.privacy-policy-document section,
main.privacy-policy-document section,
main.container section[id^="section"],
section[id^="section"] {
    padding: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 1.5rem !important;
}

.privacy-policy-document section h2,
main.privacy-policy-document section h2,
section[id^="section"] h2 {
    margin-top: 1.5rem !important;
    margin-bottom: 0.75rem !important;
}

.privacy-policy-document section p,
main.privacy-policy-document section p,
section[id^="section"] p {
    margin-bottom: 0.85rem !important;
    line-height: 1.65;
}
