/**
 * EFT Delivery Method modal styles.
 *
 * @package WP_EFT
 */

/* --- Modal backdrop --- */
#wp-eft-delivery-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: none;
}

.wp-eft-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    animation: wpEftFadeIn 0.2s ease;
}

@keyframes wpEftFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wp-eft-modal-dialog {
    position: relative;
    z-index: 1;
    margin: 5vh auto;
    max-width: 560px;
    width: calc(100% - 40px);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

/* --- Header --- */
.wp-eft-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
}

.wp-eft-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
}

.wp-eft-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #646970;
    padding: 0 4px;
    transition: color 0.15s;
}

.wp-eft-modal-close:hover {
    color: #1d2327;
}

/* --- Body --- */
.wp-eft-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.wp-eft-modal-hint {
    margin: 0 0 20px 0;
    color: #646970;
    font-size: 14px;
}

/* --- Loading state --- */
.wp-eft-method-loading p {
    margin: 0;
    color: #646970;
}

/* --- Methods grid --- */
.wp-eft-methods-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wp-eft-method-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: #f9f9f9;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.wp-eft-method-card:hover {
    border-color: #2271b1;
    background: #f0f6fc;
}

.wp-eft-method-card.wp-eft-active {
    border-color: #2271b1;
    background: #f0f6fc;
    box-shadow: 0 0 0 1px #2271b1;
}

.wp-eft-method-name {
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
}

.wp-eft-method-cost {
    font-size: 15px;
    font-weight: 600;
    color: #0a8752;
}

.wp-eft-method-step {
    font-size: 12px;
    color: #646970;
    margin-top: 2px;
}

/* --- Message box --- */
.wp-eft-method-message-box {
    margin-top: 16px;
    padding: 14px 16px;
    background: #fff8e1;
    border-left: 4px solid #f9a825;
    border-radius: 0 4px 4px 0;
}

.wp-eft-msg-content {
    font-size: 14px;
    color: #444;
    line-height: 1.5;
}

/* --- Footer --- */
.wp-eft-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid #e5e5e5;
    background: #f9f9f9;
    border-radius: 0 0 8px 8px;
}

.wp-eft-modal-footer .button {
    min-width: 100px;
}

/* --- Cart item delivery label --- */
.wp-eft-delivery-label {
    display: block;
    margin-top: 2px;
    color: #646970;
    font-weight: 400;
    font-size: 12px;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .wp-eft-modal-dialog {
        margin: 2vh auto;
        width: calc(100% - 20px);
    }

    .wp-eft-modal-header {
        padding: 16px 18px;
    }

    .wp-eft-modal-body {
        padding: 18px;
    }

    .wp-eft-modal-footer {
        padding: 14px 18px;
    }
}
