/* ============================================================
   Popup / modal styling for IIM Nagpur StudentWeb
   - .modalBackground : backdrop for AjaxControlToolkit ModalPopupExtender
   - .app-popup       : card look for ACT popup <asp:Panel> bodies
   - .modal-*         : polish for Bootstrap 5 modals
   ============================================================ */

/* ---- ACT ModalPopupExtender backdrop (overrides the faint grey in Default.css) ---- */
.modalBackground {
    background-color: rgba(15, 23, 42, 0.55) !important;
    opacity: 1 !important;
    filter: none !important;
}

/* ---- Shared card look for ACT popup panels ----
   !important is used so it overrides the inline BackColor / BorderColor /
   BorderStyle / Height that the asp:Panel controls render. */
.app-popup {
    position: relative;
    background: #ffffff !important;
    border: 0 !important;
    border-radius: 14px !important;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.30) !important;
    padding: 22px 26px !important;
    height: auto !important;
    max-width: 95vw !important;
    color: #1f2933;
    font-family: inherit;
}

/* tidy round close button for popups (top-right corner) */
.popup-close,
.popup-close:link,
.popup-close:visited {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 30px;
    height: 30px;
    line-height: 28px;
    text-align: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6b7280 !important;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    padding: 0;
    transition: background-color .15s ease, color .15s ease;
}

.popup-close:hover,
.popup-close:focus {
    background: #e5e7eb;
    color: #111827 !important;
}

.app-popup label,
.app-popup .LabelStyle {
    color: #1f2933;
    line-height: 1.5;
}

/* style raw inputs/selects/textareas that have no bootstrap class of their own */
.app-popup input[type="text"],
.app-popup input[type="password"],
.app-popup input[type="email"],
.app-popup input[type="number"],
.app-popup input[type="search"],
.app-popup select,
.app-popup textarea {
    padding: .5rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: .5rem;
    box-sizing: border-box;
    max-width: 100%;
    margin: .3rem 0;
}

.app-popup input[type="text"]:focus,
.app-popup input[type="password"]:focus,
.app-popup input[type="email"]:focus,
.app-popup input[type="number"]:focus,
.app-popup input[type="search"]:focus,
.app-popup select:focus,
.app-popup textarea:focus {
    border-color: #2894FF;
    outline: 0;
    box-shadow: 0 0 0 .2rem rgba(40, 148, 255, .25);
}

/* give action buttons that lack a bootstrap class a tidy primary look */
.app-popup input[type="submit"]:not([class*="btn"]),
.app-popup input[type="button"]:not([class*="btn"]),
.app-popup button:not([class*="btn"]) {
    background: #004080;
    color: #fff;
    border: 0;
    border-radius: .5rem;
    padding: .5rem 1.25rem;
    font-size: 1rem;
    cursor: pointer;
    margin-top: .4rem;
}

.app-popup input[type="submit"]:not([class*="btn"]):hover,
.app-popup input[type="button"]:not([class*="btn"]):hover,
.app-popup button:not([class*="btn"]):hover {
    background: #003366;
}

/* ---- Bootstrap 5 modal polish ---- */
.modal-content {
    border: 0;
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.30);
    overflow: hidden;
}

.modal-header {
    background: #f5f8fc;
    border-bottom: 2px solid #004080;
    padding: .9rem 1.25rem;
}

.modal-header .modal-title,
.modal-header h4,
.modal-header h5 {
    color: #004080;
    font-weight: 600;
    margin-bottom: 0;
}

.modal-body {
    padding: 1.25rem 1.4rem;
}
