/* =========================
   COMMON UI COMPONENTS
========================= */

/* =========================
   TOAST NOTIFICATIONS
========================= */

.uqa-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.uqa-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-width: 400px;
    animation: slideIn 0.3s ease-out;
}

/* Success Toast - Green */
.uqa-toast.success {
    background: #E2FFEA;
    border: 1px solid #05A435;
}

.uqa-toast.success .uqa-toast-message {
    color: #05A435;
}

/* Error Toast - Red */
.uqa-toast.error {
    background: #FDECEA;
    border: 1px solid #EF4444;
}

.uqa-toast.error .uqa-toast-message {
    color: #EF4444;
}

/* Warning Toast - Yellow/Orange */
.uqa-toast.warning {
    background: #FFF7ED;
    border: 1px solid #F97316;
}

.uqa-toast.warning .uqa-toast-message {
    color: #F97316;
}

/* Info Toast - Blue */
.uqa-toast.info {
    background: #EFF6FF;
    border: 1px solid #3B82F6;
}

.uqa-toast.info .uqa-toast-message {
    color: #3B82F6;
}

.uqa-toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.uqa-toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
}

.uqa-toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    font-size: 20px;
    line-height: 1;
    color: #6B7280;
}

.uqa-toast-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.uqa-toast.hiding {
    animation: slideOut 0.3s ease-in forwards;
}

@media (max-width: 640px) {
    .uqa-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .uqa-toast {
        min-width: auto;
        max-width: none;
    }
}

/* =========================
   IN-CONTENT BLOG CTA BANNER
========================= */
.uqa-in-content-cta {
    position: relative;
    width: 100%;
    padding: 2.5rem;
    border-radius: 10px;
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    box-shadow: 0 10px 25px -5px rgba(123, 44, 191, 0.25);
    box-sizing: border-box;
    overflow: hidden;
}

.uqa-in-content-cta-body {
    max-width: 65%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    position: relative;
    z-index: 2;
}

.uqa-in-content-cta-title {
    font-size: 2.5rem !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin: 0 !important;
    font-family: inherit !important;
}

.uqa-in-content-cta-subtitle {
    font-size: 1rem !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0 0 0.5rem 0 !important;
    font-family: inherit !important;
}

.uqa-in-content-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #ffffff;
    color: #4361EE !important;
    font-size: 1rem !important;
    line-height: 1.25 !important;
    font-weight: 400 !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.25s ease-in-out;
}

.uqa-in-content-cta-btn:hover {
    background-color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.uqa-btn-pencil-icon {
    width: 16px !important;
    height: 16px !important;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    margin: 0 !important;
    border-radius: 0 !important;
}

.uqa-title-pencil-icon {
    width: 40px !important;
    height: 40px !important;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    margin: 0 !important;
    border-radius: 0 !important;
}

@media (max-width: 768px) {
    .uqa-in-content-cta {
        padding: 1.75rem 1.25rem;
        margin: 1.5rem 0;
        background-position: center center;
    }

    .uqa-in-content-cta-body {
        max-width: 100%;
        text-align: left;
    }

    .uqa-in-content-cta-title {
        font-size: 1.35rem !important;
    }

    .uqa-in-content-cta-subtitle {
        font-size: 0.875rem !important;
    }

    .uqa-title-pencil-icon {
        width: 27px !important;
        height: 27px !important;
    }
}

/* =========================
   REPORT FLAG MODAL
========================= */

.uqa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: uqaFadeIn 0.25s ease-out;
}

.uqa-modal-container {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: uqaSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.uqa-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.uqa-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.uqa-modal-icon {
    width: 22px;
    height: 22px;
}

.uqa-modal-title {
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    font-family: inherit !important;
}

.uqa-modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.uqa-modal-close:hover {
    color: #111827;
    background: #f3f4f6;
}

#uqa-report-form {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.uqa-modal-subtitle {
    margin: 0 !important;
    font-size: 0.95rem !important;
    color: #4b5563 !important;
    font-weight: 500 !important;
}

.uqa-report-reasons-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.uqa-reason-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f9fafb;
    user-select: none;
}

.uqa-reason-option:hover {
    border-color: #2745D7;
    background: #fdf8ff;
}

.uqa-reason-option input[type="radio"] {
    display: none;
}

.uqa-radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #9ca3af;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-sizing: border-box;
}

.uqa-reason-option input[type="radio"]:checked + .uqa-radio-custom {
    border-color: #2745D7;
    background: #2745D7;
}

.uqa-reason-option input[type="radio"]:checked + .uqa-radio-custom::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    display: block;
    position: static;
}

.uqa-reason-option input[type="radio"]:checked ~ .uqa-reason-label {
    color: #2745D7;
    font-weight: 600;
}

.uqa-reason-option.has-checked {
    border-color: #2745D7;
    background: #fcf5ff;
}

.uqa-reason-label {
    font-size: 0.925rem;
    color: #374151;
    font-weight: 500;
}

.uqa-other-reason-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: uqaFadeIn 0.2s ease;
}

.uqa-field-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.uqa-required {
    color: #ef4444;
}

#uqa-report-custom-message {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
    resize: vertical;
}

#uqa-report-custom-message:focus {
    border-color: #2745D7;
    box-shadow: 0 0 0 3px rgba(39, 69, 215, 0.15);
}

.uqa-error-notice {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.uqa-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.uqa-btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.uqa-btn-cancel:hover {
    background: #e5e7eb;
    color: #111827;
}

.uqa-btn-submit-report {
    background: #2745D7;
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.uqa-btn-submit-report:hover {
    background: #2745D7;
}

.uqa-btn-submit-report:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@keyframes uqaFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes uqaSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 640px) {
    .uqa-modal-container {
        max-width: 100%;
        border-radius: 12px;
    }
    .uqa-modal-header, #uqa-report-form {
        padding: 16px;
    }
}