/**
 * SapTravel KLKTech — My Orders lookup page styles.
 */

/* ── Container ── */
.klktech-orders-container {
    max-width: 680px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.klktech-orders-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.klktech-orders-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 8px 0;
}

.klktech-orders-subtitle {
    font-size: 14px;
    color: #718096;
    margin: 0 0 28px 0;
}

/* ── Form ── */
.klktech-orders-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.klktech-orders-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.klktech-orders-field label {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
}

.klktech-required {
    color: #e53e3e;
}

.klktech-orders-input {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    color: #2d3748;
    background: #f7fafc;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.klktech-orders-input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66,153,225,0.15);
    background: #fff;
}

.klktech-orders-btn {
    padding: 12px 24px;
    background: #2b6cb0;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 4px;
}

.klktech-orders-btn:hover {
    background: #2c5282;
}

.klktech-orders-btn:active {
    transform: scale(0.98);
}

.klktech-orders-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
}

/* ── Status messages ── */
.klktech-orders-status {
    margin-top: 20px;
}

.klktech-orders-status-content {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.klktech-orders-status-content.klktech-status-loading {
    background: #ebf8ff;
    color: #2b6cb0;
    border: 1px solid #bee3f8;
}

.klktech-orders-status-content.klktech-status-error {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #fed7d7;
}

/* ── Result ── */
.klktech-orders-result {
    margin-top: 24px;
    border-top: 1px solid #e2e8f0;
    padding-top: 24px;
}

.klktech-orders-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.klktech-order-status-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.klktech-order-status-badge.badge-paid,
.klktech-order-status-badge.badge-confirmed {
    background: #f0fff4;
    color: #276749;
}

.klktech-order-status-badge.badge-pending {
    background: #fffff0;
    color: #975a16;
}

.klktech-order-status-badge.badge-payment_failed {
    background: #fff5f5;
    color: #c53030;
}

.klktech-order-status-badge.badge-cancelled,
.klktech-order-status-badge.badge-refunded {
    background: #edf2f7;
    color: #718096;
}

.klktech-order-meta {
    font-size: 14px;
    color: #4a5568;
    text-align: right;
}

.klktech-order-meta strong {
    color: #2d3748;
}

/* ── Details table ── */
.klktech-orders-details {
    background: #f7fafc;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.klktech-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

.klktech-detail-row + .klktech-detail-row {
    border-top: 1px solid #e2e8f0;
}

.klktech-detail-label {
    color: #718096;
    flex-shrink: 0;
}

.klktech-detail-value {
    color: #2d3748;
    font-weight: 500;
    text-align: right;
}

/* ── Vouchers ── */
.klktech-orders-vouchers h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 12px 0;
}

.klktech-voucher-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.klktech-voucher-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    border-radius: 8px;
}

.klktech-voucher-name {
    font-size: 14px;
    font-weight: 500;
    color: #276749;
}

.klktech-voucher-actions {
    display: flex;
    gap: 8px;
}

.klktech-voucher-link {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.klktech-voucher-link.view {
    background: #ebf8ff;
    color: #2b6cb0;
}

.klktech-voucher-link.view:hover {
    background: #bee3f8;
}

.klktech-voucher-link.download {
    background: #2b6cb0;
    color: #fff;
}

.klktech-voucher-link.download:hover {
    background: #2c5282;
}

.klktech-no-vouchers {
    font-size: 14px;
    color: #718096;
    padding: 12px 16px;
    background: #edf2f7;
    border-radius: 8px;
}

/* ── Spinner ── */
.klktech-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top-color: #4299e1;
    border-radius: 50%;
    animation: klktech-spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes klktech-spin {
    to { transform: rotate(360deg); }
}

/* ── Mobile ── */
@media (max-width: 640px) {
    .klktech-orders-card {
        padding: 24px 20px;
    }

    .klktech-orders-result-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .klktech-order-meta {
        text-align: left;
    }

    .klktech-voucher-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
