/*
 * components.css — Shared UI components: language switcher, toast notification,
 *                  report modal, SweetAlert2 frosted-glass theme.
 *
 * @author  Mr.Server hossam.net HOSSAM ALZYOD
 * @version 2.0
 */

/* ================================================================
   LANGUAGE DROPDOWN
   ================================================================ */
.lang-dropdown {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.lang-dropdown-toggle {
    background-color: transparent;
    border: 2px solid rgba(0, 201, 167, 0.4);
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.lang-dropdown-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0, 201, 167, 0.5);
    background-color: rgba(0, 201, 167, 0.1);
}
.lang-dropdown-toggle .fas.fa-globe {
    font-size: 20px;
    color: #00c9a7;
}

.lang-dropdown-menu {
    position: absolute;
    top: 120%;
    right: 0;
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 5px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    min-width: auto;
    z-index: 200;
}
.lang-dropdown-menu.open {
    display: flex;
}

.lang-dropdown-menu .lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: #8faab8;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.lang-dropdown-menu .lang-option:hover {
    background-color: rgba(0, 201, 167, 0.12);
    color: #00c9a7;
}
.lang-dropdown-menu .lang-option.active {
    background-color: rgba(0, 201, 167, 0.18);
    font-weight: bold;
    color: #00c9a7;
}
.lang-dropdown-menu .lang-option .flag-icon-wrapper {
    display: inline-block;
    width: 20px; height: 15px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 2px;
    vertical-align: middle;
}

/* ================================================================
   PUSH NOTIFICATION CORNER BUTTON (top-left, mirrors lang-dropdown)
   ================================================================ */
#enable-push-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
}
#enable-push-container button {
    background-color: transparent;
    border: 2px solid rgba(245, 158, 11, 0.4);
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    color: #f59e0b;
    font-size: 18px;
}
#enable-push-container button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
    background-color: rgba(245, 158, 11, 0.1);
}

/* ================================================================
   SWEETALERT2 TOAST
   ================================================================ */
.swal2-popup.swal-toast-custom {
    background: rgba(12, 20, 30, 0.93) !important;
    border: 1px solid rgba(0, 201, 167, 0.2);
    border-left: 3px solid #00c9a7;
    border-radius: 10px !important;
    padding: 10px 18px !important;
    min-width: 200px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5) !important;
}
.swal2-popup.swal-toast-custom .swal2-title {
    color: #e8f0f5 !important;
    font-size: 0.92rem !important;
    font-weight: 500;
    margin: 0;
    padding: 0;
}
.swal2-popup.swal-toast-custom .swal2-icon {
    border: none !important;
    margin: 0 !important;
    width: 1.4em;
    height: 1.4em;
}
.swal2-popup.swal-toast-custom .swal2-icon i {
    font-size: 14px;
    color: #00c9a7;
}
.swal2-popup.swal-toast-custom .swal2-timer-progress-bar {
    background: #00c9a7 !important;
    height: 2px;
}

/* ================================================================
   REPORT MODAL
   ================================================================ */
.report-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.report-modal-overlay.show {
    display: block;
    opacity: 1;
}

.report-modal {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(30, 30, 30, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 25px 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    z-index: 1050;
    width: 90%;
    max-width: 450px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    color: #fff;
}
.report-modal.show {
    display: block;
    opacity: 1;
}

.report-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.report-modal-header h3   { margin: 0; font-weight: 700; color: #fff; }
.report-modal-header .close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    font-weight: 300;
    line-height: 1;
    color: #ccc;
    cursor: pointer;
}

#custom_reason_container { display: none; }
#report_status           { margin-top: 15px; }

.report-reason-options  { margin: 10px 0 20px; }

.report-reason-option {
    display: block;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.1);
    text-align: left;
    color: #e0e0e0;
}
html[dir="rtl"] .report-reason-option { text-align: right; }

.report-reason-option:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}
.report-reason-option input[type="radio"] { display: none; }
.report-reason-option.selected {
    border-color: #fff;
    background-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
    font-weight: bold;
    color: #fff;
}

.report-modal .form-control {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}
.report-modal .form-control::placeholder { color: #ccc; }
.report-modal .btn-danger { background-color: #dc3545; border-color: #dc3545; }
.report-modal .btn-light  { background-color: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.report-modal .btn-light:hover { background-color: rgba(255, 255, 255, 0.3); }

/* ================================================================
   SWEETALERT2 — FROSTED GLASS THEME
   ================================================================ */
.swal2-popup.swal-frosted-glass {
    max-width: 340px;
    background: rgba(30, 30, 30, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}
.swal2-popup.swal-frosted-glass .swal2-title         { color: #fff; font-size: 1.25rem; }
.swal2-popup.swal-frosted-glass .swal2-html-container { color: #e0e0e0; font-size: 0.95rem; }
.swal2-popup.swal-frosted-glass .swal2-actions        { gap: 15px; }
.swal2-popup.swal-frosted-glass .swal2-icon           { border: none; margin-bottom: 1em; }
.swal2-popup.swal-frosted-glass .swal2-icon i         { font-size: 2.5rem; color: #00c9a7; }

.swal-confirm-btn {
    background: #00c9a7;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}
.swal-confirm-btn:hover { background: #00b496; }

.swal-delete-btn {
    background: #e53935;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}
.swal-delete-btn:hover { background: #c62828; }

.swal-cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 9px 22px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}
.swal-cancel-btn:hover { background: rgba(255, 255, 255, 0.18); }

/* ================================================================
   SEARCH USER CARDS
   ================================================================ */
.search-user-card .card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    color: #fff;
    transition: transform 0.2s ease, background 0.2s ease;
}
.search-user-card:hover .card {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}
