/*
 * ICMAB Registration Enhancer CSS
 * Sleek, premium, dynamic visual additions to the Tutor LMS registration flow.
 */

:root {
    --ire-primary-color: #4CAF50;
    --ire-primary-hover: #45a049;
    --ire-secondary-color: #2196F3;
    --ire-secondary-hover: #1e88e5;
    --ire-danger-color: #f44336;
    --ire-warning-bg: #fffcf4;
    --ire-warning-border: #ffd580;
    --ire-warning-text: #b26a00;
    --ire-card-bg: #ffffff;
    --ire-border-color: #e0e0e0;
    --ire-text-main: #333333;
    --ire-text-muted: #666666;
    --ire-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
    --ire-radius: 12px;
}

/* Initially hide the native Tutor LMS registration form */
#tutor-registration-form {
    display: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Make form visible when class is added */
#tutor-registration-form.ire-revealed {
    display: block !important;
    opacity: 1 !important;
}

/* Pre-screening Gate Styling */
#ire-gate-wrapper {
    margin: 40px auto;
    max-width: 600px;
    padding: 10px;
    font-family: inherit;
}

.ire-gate-card {
    background: var(--ire-card-bg);
    border: 1px solid var(--ire-border-color);
    border-radius: var(--ire-radius);
    padding: 40px 30px;
    box-shadow: var(--ire-shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ire-gate-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08), 0 3px 10px rgba(0, 0, 0, 0.02);
}

.ire-gate-icon,
.ire-warning-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
}

.ire-gate-icon svg {
    color: var(--ire-secondary-color);
}

.ire-warning-icon svg {
    color: var(--ire-danger-color);
}

.ire-gate-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--ire-text-main);
    margin-bottom: 12px;
    line-height: 1.2;
}

.ire-gate-subtitle {
    font-size: 18px;
    color: var(--ire-text-muted);
    margin-bottom: 30px;
}

.ire-gate-subtitle strong {
    color: var(--ire-secondary-color);
    font-weight: 700;
}

.ire-gate-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 480px) {
    .ire-gate-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

/* Button aesthetics */
.ire-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.ire-btn-yes {
    background: var(--ire-danger-color);
    color: #ffffff;
}

.ire-btn-yes:hover {
    background: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(244, 67, 54, 0.2);
}

.ire-btn-no {
    background: var(--ire-primary-color);
    color: #ffffff;
}

.ire-btn-no:hover {
    background: var(--ire-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.2);
}

/* Warning Screen Panels */
.ire-warning-card {
    border-top: 5px solid var(--ire-danger-color);
}

.ire-warning-title {
    color: var(--ire-danger-color);
}

.ire-warning-message {
    text-align: left;
    background: var(--ire-warning-bg);
    border: 1px solid var(--ire-warning-border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    font-size: 15px;
    line-height: 1.6;
    color: #555555;
}

.ire-warning-message p {
    margin-bottom: 12px;
}

.ire-warning-message p:last-child {
    margin-bottom: 0;
}

.ire-btn-login {
    background: var(--ire-secondary-color);
    color: #ffffff;
    width: 100%;
    margin-bottom: 20px;
    padding: 16px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ire-btn-login:hover {
    background: var(--ire-secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(33, 150, 243, 0.25);
}

.ire-btn-back {
    background: transparent;
    color: var(--ire-text-muted);
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}

.ire-btn-back:hover {
    color: var(--ire-text-main);
    text-decoration: underline;
}

/* Extra Form Fields Styling */
.ire-extra-fields-divider {
    display: flex;
    align-items: center;
    margin: 35px 0 25px;
    text-align: center;
}

.ire-extra-fields-divider::before,
.ire-extra-fields-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px dashed var(--ire-border-color);
}

.ire-extra-fields-divider::before {
    margin-right: 15px;
}

.ire-extra-fields-divider::after {
    margin-left: 15px;
}

.ire-extra-fields-divider span {
    font-size: 13px;
    font-weight: 600;
    color: var(--ire-secondary-color);
    letter-spacing: 1px;
    text-transform: uppercase;
    background: #f7f9fa;
    padding: 4px 15px;
    border-radius: 20px;
    border: 1px solid var(--ire-border-color);
}

/* Referral selection options */
.ire-referral-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 8px;
    margin-bottom: 15px;
}

.ire-referral-option {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--ire-border-color);
    border-radius: 8px;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    user-select: none;
}

.ire-referral-option:hover {
    border-color: var(--ire-secondary-color);
    background: rgba(33, 150, 243, 0.02);
}

.ire-referral-option input[type="radio"] {
    display: none;
    /* Hide default radio button */
}

/* Custom modern radio element */
.ire-referral-custom-radio {
    width: 16px;
    height: 16px;
    border: 2px solid var(--ire-border-color);
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    display: inline-block;
    transition: all 0.2s ease;
}

.ire-referral-option input[type="radio"]:checked+.ire-referral-custom-radio {
    border-color: var(--ire-secondary-color);
}

.ire-referral-custom-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--ire-secondary-color);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ire-referral-option input[type="radio"]:checked+.ire-referral-custom-radio::after {
    transform: translate(-50%, -50%) scale(1);
}

.ire-referral-option input[type="radio"]:checked~.ire-referral-label-text {
    color: var(--ire-secondary-color);
    font-weight: 600;
}

.ire-referral-option input[type="radio"]:checked {
    border-color: var(--ire-secondary-color);
}

.ire-referral-option:has(input[type="radio"]:checked) {
    border-color: var(--ire-secondary-color);
    background: rgba(33, 150, 243, 0.05);
}

/* Extra fields text inputs */
.ire-referral-other-wrap {
    margin-top: 10px;
    animation: slideDown 0.3s ease-out;
}

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

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

.ire-required-star {
    color: var(--ire-danger-color);
    margin-left: 2px;
    font-weight: bold;
}

/* Bypass Gate and Show Form instantly if form has submission errors */
body.ire-has-errors #ire-gate-wrapper {
    display: none !important;
}

body.ire-has-errors #tutor-registration-form {
    display: block !important;
    opacity: 1 !important;
}



.tutor-form-group input[type=tel] {
    width: 100%;
    box-shadow: none;
    text-indent: 15px;
    background: #fff;
    border: 1px solid #dcdfe5;
    border-radius: 4px;
    margin-bottom: 20px;
    padding: 0;
    font-size: 16px;
    line-height: 48px;
    transition: all .3s;
    display: block;
}