/* Partner Modal Overlay */
#partner-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10005;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#partner-modal-overlay.active {
    display: flex;
    opacity: 1;
}

#partner-modal-overlay [hidden] {
    display: none !important;
}

#partner-modal-overlay .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Modal Content Container */
#partner-modal-container {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

#partner-modal-overlay.active #partner-modal-container {
    transform: translateY(0) scale(1);
}

/* Close Button */
.partner-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f1f1f5;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #3c2415;
    transition: all 0.2s ease;
    z-index: 10;
}

.partner-modal-close:hover {
    background: #e85d04;
    color: #ffffff;
    transform: rotate(90deg);
}

/* Back Button */
.partner-back-btn {
    background: none;
    border: none;
    padding: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    color: #212121;
    cursor: pointer;
    transition: color 0.2s ease;
}

.partner-back-btn:hover {
    color: #e85d04;
}

/* Top Card (Get Started) */
.partner-modal-top {
    padding: 35px 35px 25px 35px;
    border-bottom: 1px dashed #e2e2e7;
}

.partner-modal-top h2 {
    font-size: 26px;
    font-weight: 800;
    color: #212121;
    margin-bottom: 20px;
}

.partner-subtitle-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 15px;
}

.partner-subtitle-row p {
    font-size: 14.5px;
    color: #686b78;
    line-height: 1.4;
    font-weight: 500;
}

.partner-info-icon {
    color: #93959f;
    flex-shrink: 0;
    margin-top: 2px;
}

.partner-input-group {
    margin-bottom: 20px;
}

.partner-input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #d4d5d9;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #212121;
    outline: none;
    transition: all 0.2s ease;
}

.partner-input:focus {
    border-color: #e85d04;
    box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.1);
}

.partner-btn-continue {
    width: 100%;
    padding: 16px;
    background: #e2e2e7;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 16px;
    cursor: not-allowed;
    transition: all 0.2s ease;
    margin-bottom: 15px;
}

.partner-btn-continue.active {
    background: #e85d04;
    cursor: pointer;
}

.partner-btn-continue:disabled {
    cursor: not-allowed;
}

.partner-btn-continue.active:hover {
    background: #dc2f02;
    transform: translateY(-1px);
}

.partner-terms {
    text-align: center;
    font-size: 12.5px;
    color: #93959f;
    font-weight: 500;
}

.partner-terms a {
    color: #282c3f;
    text-decoration: underline;
    font-weight: 700;
}

.partner-otp-panel {
    border-bottom: 0;
    padding-bottom: 35px;
}

.partner-resend-btn {
    padding: 0;
    border: 0;
    background: transparent;
    color: #282c3f;
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.partner-resend-btn:hover {
    color: #e85d04;
}

.partner-modal-status {
    margin-top: 16px;
    padding: 11px 14px;
    border: 1px solid #c9ead8;
    border-radius: 10px;
    background: #effaf4;
    color: #217a4c;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

/* Animated Partner Benefits */
.partner-modal-bottom {
    padding: 24px 35px 30px;
    background: linear-gradient(145deg, #fffaf6 0%, #fff3ea 100%);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    overflow: hidden;
}

.partner-benefits-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 17px;
}

.partner-benefits-kicker {
    display: block;
    margin-bottom: 4px;
    color: #e85d04;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.partner-benefits-heading h3 {
    margin: 0;
    color: #2d1e15;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 800;
}

.partner-live-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    color: #2f7d4a;
    background: #ebf8ef;
    border: 1px solid #ccebd6;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.partner-live-badge > span {
    width: 7px;
    height: 7px;
    background: #34a853;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(52, 168, 83, 0.35);
    animation: partner-live-pulse 1.8s infinite;
}

.partner-benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
}

.partner-benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(232, 93, 4, 0.12);
    border-radius: 12px;
    opacity: 0;
    transform: translateX(-18px);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.partner-benefit-item:hover {
    border-color: rgba(232, 93, 4, 0.42);
    transform: translateY(-2px) !important;
    box-shadow: 0 7px 18px rgba(110, 55, 20, 0.08);
}

.partner-benefit-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e85d04;
    background: #fff0e6;
    border-radius: 10px;
}

.partner-benefit-icon svg {
    width: 18px;
    height: 18px;
}

.partner-benefit-item strong,
.partner-benefit-item small {
    display: block;
}

.partner-benefit-item strong {
    margin-bottom: 2px;
    color: #35251c;
    font-size: 12.5px;
    font-weight: 800;
}

.partner-benefit-item small {
    color: #7c6d63;
    font-size: 10.5px;
    line-height: 1.35;
    font-weight: 500;
}

#partner-modal-overlay.active .partner-benefit-item {
    animation: partner-benefit-in 0.45s ease forwards;
}

#partner-modal-overlay.active .partner-benefit-item:nth-child(2) {
    animation-delay: 0.08s;
}

#partner-modal-overlay.active .partner-benefit-item:nth-child(3) {
    animation-delay: 0.16s;
}

@keyframes partner-benefit-in {
    to { opacity: 1; transform: translateX(0); }
}

@keyframes partner-live-pulse {
    70% { box-shadow: 0 0 0 6px rgba(52, 168, 83, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 168, 83, 0); }
}

@media (max-width: 576px) {
    #partner-modal-container {
        border-radius: 16px;
        margin: 16px;
        max-width: calc(100% - 32px);
    }
    
    .partner-modal-top, .partner-modal-bottom {
        padding: 24px;
    }
}
