/* Posenda İptal & İade - Public Styles */

.pii-order-actions {
    margin: 24px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.pii-section-title {
    font-size: 18px;
    margin: 0 0 14px;
    color: #333;
}

.pii-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    margin-right: 8px;
    margin-bottom: 8px;
}

.pii-btn-cancel {
    background: #e53935;
    color: #fff;
}

.pii-btn-cancel:hover {
    background: #c62828;
    color: #fff;
}

.pii-btn-refund {
    background: #1976d2;
    color: #fff;
}

.pii-btn-refund:hover {
    background: #1565c0;
    color: #fff;
}

.pii-btn-primary {
    background: #2271b1;
    color: #fff;
}

.pii-btn-primary:hover {
    background: #135e96;
    color: #fff;
}

.pii-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.pii-btn-secondary:hover {
    background: #ddd;
}

.pii-notice-pending {
    padding: 12px 16px;
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    font-size: 14px;
    color: #5f4b00;
}

.pii-policy-text {
    margin-top: 16px;
    padding: 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

/* Modal */
.pii-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.pii-modal {
    background: #fff;
    border-radius: 8px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 0 8px 40px rgba(0,0,0,0.25);
    max-height: 90vh;
    overflow-y: auto;
}

.pii-modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 4px 8px;
}

.pii-modal-close:hover {
    color: #333;
}

#pii-modal-title {
    margin: 0 0 8px;
    font-size: 20px;
    color: #222;
}

.pii-modal-desc {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.pii-form-group {
    margin-bottom: 18px;
}

.pii-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
}

.pii-required {
    color: #e53935;
}

.pii-select,
#pii-customer-note {
    width: 100%;
    padding: 9px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    background: #fff;
    transition: border-color 0.2s;
}

.pii-select:focus,
#pii-customer-note:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34,113,177,0.15);
}

.pii-select.pii-error,
#pii-customer-note.pii-error {
    border-color: #e53935;
}

.pii-field-error {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #e53935;
}

.pii-modal-footer {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.pii-modal-msg {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
}

.pii-modal-msg.success {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #a5d6a7;
}

.pii-modal-msg.error {
    background: #ffebee;
    color: #b71c1c;
    border: 1px solid #ef9a9a;
}

/* Thank you page */
.pii-thankyou-policy {
    margin-top: 30px;
}

.pii-policy-content {
    padding: 16px;
    background: #f9f9f9;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.7;
}

/* ============================
   Sipariş Detay - Talep Bölümü
   ============================ */

.pii-order-actions {
    margin: 28px 0 0;
    padding: 22px 24px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.pii-section-title {
    font-size: 17px;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    color: #222;
}

.pii-action-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* Geçmiş talepler */
.pii-past-requests {
    margin-bottom: 20px;
}

.pii-past-requests h3 {
    font-size: 14px;
    color: #666;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pii-request-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fafafa;
    border: 1px solid #ebebeb;
    border-radius: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    font-size: 14px;
}

.pii-req-type    { font-weight: 600; min-width: 80px; }
.pii-req-reason  { flex: 1; color: #444; }
.pii-req-date    { color: #888; font-size: 13px; }
.pii-req-admin-note {
    width: 100%;
    margin-top: 6px;
    padding: 6px 10px;
    background: #e8f4fd;
    border-radius: 4px;
    font-size: 13px;
    color: #1a5276;
}

/* Status badges - müşteri tarafı */
.pii-req-status,
.pii-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.pii-status-pending    { background: #fff8e1; color: #7a5800; border: 1px solid #ffc107; }
.pii-status-approved   { background: #e8f5e9; color: #1b5e20; border: 1px solid #66bb6a; }
.pii-status-rejected   { background: #ffebee; color: #b71c1c; border: 1px solid #ef5350; }
.pii-status-processing { background: #e3f2fd; color: #0d47a1; border: 1px solid #42a5f5; }
.pii-status-completed  { background: #e8f5e9; color: #1b5e20; border: 1px solid #66bb6a; }

.pii-no-action {
    color: #888;
    font-size: 14px;
    margin: 0 0 12px;
}

/* İptal & İade politika akordiyon */
.pii-policy-details {
    margin-top: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.pii-policy-details summary {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    background: #f9f9f9;
    user-select: none;
}

.pii-policy-details[open] summary {
    border-bottom: 1px solid #e0e0e0;
}

.pii-policy-details .pii-policy-content {
    padding: 14px;
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    background: #fff;
}

/* ============================
   Sipariş Listesi aksiyonları
   ============================ */
.woocommerce-orders-table .pii-list-action {
    font-size: 12px !important;
    padding: 5px 10px !important;
}

/* ============================
   Hesap menüsü - Taleplerim
   ============================ */
.pii-my-requests-table {
    margin-top: 0;
    font-size: 14px;
}

.pii-my-requests-table .pii-note-row td {
    background: #f0f7ff;
    font-size: 13px;
    color: #1a5276;
    border-top: none !important;
}
