/**
 * Pixel Gallery - Hide Requests Styles (requests.css)
 * สไตล์สำหรับปุ่มขอซ่อนรูปภาพใน Lightbox, Modal แบบเลือกเหตุผล, และรายการคำขอซ่อนรูปในหน้าโปรไฟล์
 */

/* ==========================================================================
   1. ปุ่มขอซ่อนรูปภาพใน Lightbox (Minimal Borderless)
   ========================================================================== */
.lightbox-hide-btn {
    position: relative;
    top: auto;
    right: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border-radius: 9999px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.82rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
    z-index: 10003;
    user-select: none;
    line-height: 1;
    box-shadow: none;
    box-sizing: border-box;
    white-space: nowrap;
}

/* Fallback กรณีไม่ได้อยู่ใน .lightbox-top-actions */
#lightbox > .lightbox-hide-btn {
    position: absolute;
    top: 20px;
    right: 140px;
    height: 38px;
    background: rgba(24, 24, 27, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

@media (hover: hover) and (pointer: fine) {
    .lightbox-hide-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #ffffff;
    }
}

.lightbox-hide-btn:active {
    transform: scale(0.96);
}

.lightbox-hide-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

/* สถานะ: ส่งคำขอแล้ว (รอดำเนินการ) */
.lightbox-hide-btn.is-pending {
    background: rgba(245, 158, 11, 0.22);
    border: none;
    color: #fde68a;
    cursor: pointer;
}

.lightbox-hide-btn.is-pending svg {
    stroke: #fbbf24;
}

/* สถานะ: แอดมินลบรูปแล้ว */
.lightbox-hide-btn.is-done {
    background: rgba(16, 185, 129, 0.22);
    border: none;
    color: #a7f3d0;
    cursor: default;
}

@media (max-width: 680px) {
    .lightbox-hide-btn {
        width: 32px;
        height: 32px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    #lightbox > .lightbox-hide-btn {
        top: 16px;
        right: 60px;
    }
    .lightbox-hide-btn .lightbox-hide-text,
    .lightbox-hide-btn span {
        display: none !important;
    }
}

/* ==========================================================================
   2. หน้าต่าง Modal ขอซ่อนรูปภาพ (#pg-hide-modal - Minimal Borderless Glass)
   ========================================================================== */
.pg-hide-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.36);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100010;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background 0.3s ease;
}

body.dark-mode .pg-hide-overlay,
html.dark-mode .pg-hide-overlay,
[data-theme="dark"] .pg-hide-overlay {
    background: rgba(0, 0, 0, 0.65);
}

.pg-hide-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pg-hide-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -46%) scale(0.96);
    width: calc(100% - 32px);
    max-width: 460px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.74) 100%);
    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    border: none;
    color: #111827;
    border-radius: 28px;
    padding: 26px 26px 24px;
    box-sizing: border-box;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16), 0 4px 16px rgba(0, 0, 0, 0.05);
    z-index: 100011;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s ease, background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    font-family: var(--font-sans, 'Kanit', sans-serif);
}

body.dark-mode .pg-hide-modal,
html.dark-mode .pg-hide-modal,
[data-theme="dark"] .pg-hide-modal {
    background: linear-gradient(145deg, rgba(39, 39, 42, 0.84) 0%, rgba(18, 18, 20, 0.88) 100%);
    color: #f4f4f5;
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.65), 0 4px 16px rgba(0, 0, 0, 0.4);
}

.pg-hide-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.pg-hide-close-x {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    color: #6b7280;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    outline: none;
}

.pg-hide-close-x svg {
    width: 17px;
    height: 17px;
}

@media (hover: hover) and (pointer: fine) {
    .pg-hide-close-x:hover {
        background: rgba(0, 0, 0, 0.1);
        color: #111827;
    }
}

.pg-hide-close-x:active {
    transform: scale(0.94);
}

body.dark-mode .pg-hide-close-x,
html.dark-mode .pg-hide-close-x,
[data-theme="dark"] .pg-hide-close-x {
    background: rgba(255, 255, 255, 0.08);
    color: #a1a1aa;
}

@media (hover: hover) and (pointer: fine) {
    body.dark-mode .pg-hide-close-x:hover,
    html.dark-mode .pg-hide-close-x:hover,
    [data-theme="dark"] .pg-hide-close-x:hover {
        background: rgba(255, 255, 255, 0.16);
        color: #ffffff;
    }
}

/* ส่วนหัวแบบกะทัดรัด (ไอคอนคู่ข้อความ) */
.pg-hide-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding-right: 36px;
}

.pg-hide-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.dark-mode .pg-hide-icon-badge,
html.dark-mode .pg-hide-icon-badge,
[data-theme="dark"] .pg-hide-icon-badge {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.pg-hide-icon-badge svg {
    width: 21px;
    height: 21px;
}

.pg-hide-header-text {
    min-width: 0;
    flex: 1;
}

.pg-hide-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 2px 0;
    color: inherit;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.pg-hide-subtitle {
    font-size: 0.8rem;
    color: #52525b;
    margin: 0;
    line-height: 1.4;
}

body.dark-mode .pg-hide-subtitle,
html.dark-mode .pg-hide-subtitle,
[data-theme="dark"] .pg-hide-subtitle {
    color: #a1a1aa;
}

/* พรีวิวรูปภาพเป้าหมาย (ไร้กรอบ) */
.pg-hide-target-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.04);
    border: none;
    margin-bottom: 16px;
}

body.dark-mode .pg-hide-target-preview,
html.dark-mode .pg-hide-target-preview,
[data-theme="dark"] .pg-hide-target-preview {
    background: rgba(255, 255, 255, 0.06);
}

.pg-hide-target-preview img {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.pg-hide-target-info {
    min-width: 0;
    flex: 1;
}

.pg-hide-img-name {
    font-size: 0.86rem;
    font-weight: 600;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 1px;
}

.pg-hide-album-name {
    font-size: 0.75rem;
    color: #52525b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-mode .pg-hide-album-name,
html.dark-mode .pg-hide-album-name,
[data-theme="dark"] .pg-hide-album-name {
    color: #a1a1aa;
}

/* กลุ่มตัวเลือกเหตุผล (2x2 Grid ไร้กรอบ ประหยัดพื้นที่แนวตั้ง) */
.pg-hide-form-group {
    margin-bottom: 14px;
}

.pg-hide-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #52525b;
    margin-bottom: 8px;
}

.pg-hide-label span {
    font-weight: 400;
    opacity: 0.75;
}

body.dark-mode .pg-hide-label,
html.dark-mode .pg-hide-label,
[data-theme="dark"] .pg-hide-label {
    color: #a1a1aa;
}

.pg-hide-reasons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.pg-hide-reason-option {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 12px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.04);
    border: none;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
    user-select: none;
}

body.dark-mode .pg-hide-reason-option,
html.dark-mode .pg-hide-reason-option,
[data-theme="dark"] .pg-hide-reason-option {
    background: rgba(255, 255, 255, 0.055);
}

@media (hover: hover) and (pointer: fine) {
    .pg-hide-reason-option:hover {
        background: rgba(0, 0, 0, 0.07);
    }
}

@media (hover: hover) and (pointer: fine) {
    body.dark-mode .pg-hide-reason-option:hover,
    html.dark-mode .pg-hide-reason-option:hover,
    [data-theme="dark"] .pg-hide-reason-option:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

.pg-hide-reason-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pg-hide-radio-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    transition: background 0.18s ease, transform 0.18s ease;
}

.pg-hide-radio-dot::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
    transition: background 0.18s ease, transform 0.18s ease;
    transform: scale(0);
}

body.dark-mode .pg-hide-radio-dot,
html.dark-mode .pg-hide-radio-dot,
[data-theme="dark"] .pg-hide-radio-dot {
    background: rgba(255, 255, 255, 0.14);
}

/* สถานะการ์ดที่เลือก (ไร้เส้นขอบ ใช้โทนสีตัดกันชัดเจน) */
.pg-hide-reason-option.selected {
    background: #111827;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.pg-hide-reason-option.selected .pg-hide-radio-dot {
    background: #ffffff;
}

.pg-hide-reason-option.selected .pg-hide-radio-dot::after {
    background: #111827;
    transform: scale(1);
}

body.dark-mode .pg-hide-reason-option.selected,
html.dark-mode .pg-hide-reason-option.selected,
[data-theme="dark"] .pg-hide-reason-option.selected {
    background: #ffffff;
    color: #111827;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

body.dark-mode .pg-hide-reason-option.selected .pg-hide-radio-dot,
html.dark-mode .pg-hide-reason-option.selected .pg-hide-radio-dot,
[data-theme="dark"] .pg-hide-reason-option.selected .pg-hide-radio-dot {
    background: #111827;
}

body.dark-mode .pg-hide-reason-option.selected .pg-hide-radio-dot::after,
html.dark-mode .pg-hide-reason-option.selected .pg-hide-radio-dot::after,
[data-theme="dark"] .pg-hide-reason-option.selected .pg-hide-radio-dot::after {
    background: #ffffff;
    transform: scale(1);
}

.pg-hide-reason-label {
    min-width: 0;
    flex: 1;
}

.pg-hide-reason-label strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: inherit;
    margin-bottom: 2px;
    line-height: 1.25;
}

.pg-hide-reason-label small {
    display: block;
    font-size: 0.71rem;
    color: #6b7280;
    line-height: 1.3;
}

body.dark-mode .pg-hide-reason-label small,
html.dark-mode .pg-hide-reason-label small,
[data-theme="dark"] .pg-hide-reason-label small {
    color: #a1a1aa;
}

.pg-hide-reason-option.selected .pg-hide-reason-label small {
    color: rgba(255, 255, 255, 0.72);
}

body.dark-mode .pg-hide-reason-option.selected .pg-hide-reason-label small,
html.dark-mode .pg-hide-reason-option.selected .pg-hide-reason-label small,
[data-theme="dark"] .pg-hide-reason-option.selected .pg-hide-reason-label small {
    color: rgba(17, 24, 39, 0.7);
}

/* ช่องกรอกรายละเอียดเพิ่มเติม (ไร้กรอบ) */
.pg-hide-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border-radius: 16px;
    border: none;
    background: rgba(0, 0, 0, 0.045);
    color: inherit;
    font-family: inherit;
    font-size: 0.84rem;
    line-height: 1.45;
    resize: none;
    outline: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.pg-hide-textarea::placeholder {
    color: #9ca3af;
}

body.dark-mode .pg-hide-textarea,
html.dark-mode .pg-hide-textarea,
[data-theme="dark"] .pg-hide-textarea {
    background: rgba(255, 255, 255, 0.06);
}

body.dark-mode .pg-hide-textarea::placeholder,
html.dark-mode .pg-hide-textarea::placeholder,
[data-theme="dark"] .pg-hide-textarea::placeholder {
    color: #71717a;
}

.pg-hide-textarea:focus {
    background: rgba(0, 0, 0, 0.07);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.14);
}

body.dark-mode .pg-hide-textarea:focus,
html.dark-mode .pg-hide-textarea:focus,
[data-theme="dark"] .pg-hide-textarea:focus {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22);
}

/* ปุ่มควบคุมด้านล่าง (แคปซูลไร้กรอบ) */
.pg-hide-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}

.pg-hide-btn-cancel {
    padding: 11px 20px;
    background: rgba(0, 0, 0, 0.055);
    color: #374151;
    border: none;
    border-radius: 9999px;
    font-size: 0.86rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
    outline: none;
}

@media (hover: hover) and (pointer: fine) {
    .pg-hide-btn-cancel:hover {
        background: rgba(0, 0, 0, 0.1);
        color: #111827;
    }
}

.pg-hide-btn-cancel:active {
    transform: scale(0.97);
}

body.dark-mode .pg-hide-btn-cancel,
html.dark-mode .pg-hide-btn-cancel,
[data-theme="dark"] .pg-hide-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: #d4d4d8;
}

@media (hover: hover) and (pointer: fine) {
    body.dark-mode .pg-hide-btn-cancel:hover,
    html.dark-mode .pg-hide-btn-cancel:hover,
    [data-theme="dark"] .pg-hide-btn-cancel:hover {
        background: rgba(255, 255, 255, 0.15);
        color: #ffffff;
    }
}

.pg-hide-btn-submit {
    flex: 1;
    padding: 11px 22px;
    background: #111827;
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
    outline: none;
}

@media (hover: hover) and (pointer: fine) {
    .pg-hide-btn-submit:hover:not(:disabled) {
        background: #27272a;
        transform: translateY(-1px);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    }
}

.pg-hide-btn-submit:active:not(:disabled) {
    transform: scale(0.98);
}

body.dark-mode .pg-hide-btn-submit,
html.dark-mode .pg-hide-btn-submit,
[data-theme="dark"] .pg-hide-btn-submit {
    background: #ffffff;
    color: #111827;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.38);
}

@media (hover: hover) and (pointer: fine) {
    body.dark-mode .pg-hide-btn-submit:hover:not(:disabled),
    html.dark-mode .pg-hide-btn-submit:hover:not(:disabled),
    [data-theme="dark"] .pg-hide-btn-submit:hover:not(:disabled) {
        background: #e4e4e7;
    }
}

.pg-hide-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 520px) {
    .pg-hide-modal {
        padding: 22px 20px 20px;
        border-radius: 24px;
    }

    .pg-hide-reasons {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .pg-hide-reason-option {
        padding: 10px 12px;
        align-items: center;
    }

    .pg-hide-radio-dot {
        margin-top: 0;
    }
}

/* ==========================================================================
   3. Toast Notification สำหรับการแจ้งเตือนคำขอ (Status Badge Pill - ซิงก์ดีไซน์เดียวกับ account.css)
   ========================================================================== */
.pg-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px) scale(0.95);
    width: max-content;
    max-width: min(440px, calc(100vw - 32px));
    min-height: 35px;
    background: #F4F4F5;
    color: #777777;
    padding: 7px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: 0.005em;
    box-shadow: 0 12px 32px -6px rgba(0, 0, 0, 0.16), 0 4px 10px rgba(0, 0, 0, 0.06);
    z-index: 100050;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.25s ease, bottom 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    pointer-events: none;
    box-sizing: border-box;
    font-family: var(--font-sans, 'Kanit', sans-serif);
    text-align: left;
}

body.lightbox-open .pg-toast,
html.lightbox-open .pg-toast {
    bottom: 88px;
}

.pg-toast.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

.pg-toast-icon {
    width: 16px;
    height: 16px;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pg-toast-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 3;
}

.pg-toast-text {
    flex: 0 1 auto;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.pg-toast.success {
    background: #ECFDF5;
    color: #57BC6C;
    border-color: rgba(87, 188, 108, 0.24);
    box-shadow: 0 12px 30px -6px rgba(87, 188, 108, 0.24), 0 4px 10px rgba(0, 0, 0, 0.06);
}

.pg-toast.error {
    background: #FFF1F2;
    color: #D57463;
    border-color: rgba(213, 116, 99, 0.24);
    box-shadow: 0 12px 30px -6px rgba(213, 116, 99, 0.24), 0 4px 10px rgba(0, 0, 0, 0.06);
}

.pg-toast.info {
    background: #E0F2FE;
    color: #008AF5;
    border-color: rgba(0, 138, 245, 0.24);
    box-shadow: 0 12px 30px -6px rgba(0, 138, 245, 0.22), 0 4px 10px rgba(0, 0, 0, 0.06);
}

.pg-toast.pending {
    background: #FFF7ED;
    color: #EAA65D;
    border-color: rgba(234, 166, 93, 0.24);
}

.pg-toast.review {
    background: #FEFCE8;
    color: #F0B13D;
    border-color: rgba(240, 177, 61, 0.24);
}

.pg-toast.expired {
    background: #F4F4F5;
    color: #777777;
    border-color: rgba(119, 119, 119, 0.2);
}

.pg-toast.submitted {
    background: #F5F3FF;
    color: #6C3CF0;
    border-color: rgba(108, 60, 240, 0.2);
}

@media (max-width: 640px) {
    .pg-toast {
        bottom: 22px;
        max-width: calc(100vw - 28px);
        min-height: 35px;
        padding: 7px 14px;
        border-radius: 12px;
        font-size: 0.82rem;
        line-height: 1.45;
        gap: 7px;
    }

    body.lightbox-open .pg-toast,
    html.lightbox-open .pg-toast {
        bottom: 78px;
    }

    .pg-toast-icon {
        width: 15px;
        height: 15px;
    }

    .pg-toast-icon svg {
        width: 15px;
        height: 15px;
    }
}
