/* ===== DegreeDrishti Popup Forms - Shared Styles ===== */

/* Overlay */
.dd-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    animation: ddFadeIn 0.3s ease;
}

.dd-popup-overlay.active {
    display: flex;
}

@keyframes ddFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ddSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Modal Box */
.dd-popup-modal {
    background: #fff;
    border-radius: 20px;
    width: 90%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: ddSlideUp 0.4s ease;
}

.dd-popup-modal::-webkit-scrollbar {
    width: 5px;
}

.dd-popup-modal::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* Close Button */
.dd-popup-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: rgba(0,0,0,0.08);
    border: none;
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: all 0.3s;
    z-index: 2;
    line-height: 1;
}

.dd-popup-close:hover {
    background: rgba(0,0,0,0.15);
    color: #000;
    transform: rotate(90deg);
}

/* ===== ENQUIRE NOW POPUP ===== */
.dd-enquire-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 28px 30px 22px;
    border-radius: 20px 20px 0 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dd-enquire-header::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.dd-enquire-header .dd-popup-close {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.dd-enquire-header .dd-popup-close:hover {
    background: rgba(255,255,255,0.35);
}

.dd-enquire-header h2 {
    color: #fff;
    font-size: 1.45rem;
    font-weight: 700;
    margin: 0 0 6px;
}

.dd-enquire-header p {
    color: rgba(255,255,255,0.85);
    font-size: 0.88rem;
    margin: 0;
    font-weight: 400;
}

.dd-enquire-body {
    padding: 24px 30px 30px;
}

.dd-enquire-body .dd-form-group {
    margin-bottom: 16px;
}

.dd-enquire-body .dd-form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.dd-enquire-body .dd-form-group input,
.dd-enquire-body .dd-form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #333;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
    background: #fafafa;
    box-sizing: border-box;
}

.dd-enquire-body .dd-form-group input:focus,
.dd-enquire-body .dd-form-group select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: #fff;
}

.dd-enquire-body .dd-form-group input::placeholder {
    color: #aaa;
}

.dd-phone-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.dd-phone-row select {
    width: 88px;
    flex-shrink: 0;
}

.dd-phone-row input {
    flex: 1;
    min-width: 0;
}

/* Override the full-width form-group rule specifically for phone row */
.dd-enquire-body .dd-phone-row select,
.dd-counselling-body .dd-phone-row select {
    width: 88px;
    min-width: 88px;
    flex-shrink: 0;
}

.dd-enquire-body .dd-phone-row input,
.dd-counselling-body .dd-phone-row input {
    flex: 1;
    width: auto;
    min-width: 0;
}

.dd-enquire-body .dd-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    margin-top: 6px;
    position: relative;
    overflow: hidden;
}

.dd-enquire-body .dd-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.dd-enquire-body .dd-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.dd-form-note {
    text-align: center;
    font-size: 0.75rem;
    color: #999;
    margin-top: 12px;
}

.dd-form-note i {
    color: #28a745;
    margin-right: 4px;
}

/* ===== COUNSELLING TIMED POPUP ===== */
.dd-counselling-modal {
    max-width: 420px;
    text-align: center;
    overflow: visible;
}

.dd-counselling-header {
    padding: 30px 30px 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border-radius: 20px 20px 0 0;
    position: relative;
    overflow: hidden;
}

.dd-counselling-header::before {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}

.dd-counselling-header .dd-popup-close {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.dd-counselling-header .dd-popup-close:hover {
    background: rgba(255,255,255,0.35);
}

.dd-counselling-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

.dd-counselling-header h2 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.35;
}

.dd-counselling-header p {
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
    margin: 0;
    font-weight: 600;
}

.dd-counselling-body {
    padding: 24px 30px 28px;
}

.dd-counselling-body .dd-form-group {
    margin-bottom: 14px;
}

.dd-counselling-body .dd-form-group input,
.dd-counselling-body .dd-form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #333;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
    background: #fafafa;
    box-sizing: border-box;
}

.dd-counselling-body .dd-form-group input:focus,
.dd-counselling-body .dd-form-group select:focus {
    border-color: #ee5a24;
    box-shadow: 0 0 0 3px rgba(238, 90, 36, 0.15);
    background: #fff;
}

.dd-counselling-body .dd-form-group input::placeholder {
    color: #aaa;
}

.dd-counselling-body .dd-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    margin-top: 4px;
}

.dd-counselling-body .dd-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 90, 36, 0.4);
}

.dd-counselling-body .dd-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ===== SUCCESS STATE ===== */
.dd-form-success {
    display: none;
    text-align: center;
    padding: 40px 30px;
}

.dd-form-success.active {
    display: block;
}

.dd-form-success .success-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 2rem;
    color: #fff;
    animation: ddSuccessPop 0.5s ease;
}

@keyframes ddSuccessPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.dd-form-success h3 {
    font-size: 1.3rem;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.dd-form-success p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ===== LOADING SPINNER ===== */
.dd-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: ddSpin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes ddSpin {
    to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 520px) {
    .dd-popup-modal {
        width: 95%;
        max-height: 92vh;
        border-radius: 16px;
    }

    .dd-enquire-header,
    .dd-counselling-header {
        padding: 22px 20px 18px;
        border-radius: 16px 16px 0 0;
    }

    .dd-enquire-body,
    .dd-counselling-body {
        padding: 18px 20px 24px;
    }

    .dd-enquire-header h2 {
        font-size: 1.2rem;
    }

    .dd-counselling-header h2 {
        font-size: 1.1rem;
    }

    .dd-phone-row {
        flex-direction: row;
        gap: 8px;
        align-items: stretch;
    }

    .dd-phone-row select {
        width: 88px;
        min-width: 88px;
        flex-shrink: 0;
    }

    .dd-phone-row input {
        flex: 1;
        min-width: 0;
    }
}
