/* Korban Booking Modal & Form Styles */

/* Button trigger */
.korban-booking-wrapper {
    margin-bottom: 20px;
}

.korban-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
    line-height: 1.4;
}

.korban-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.korban-btn-primary {
    background-color: #e67e22;
    color: #fff;
}

.korban-btn-primary:hover:not(:disabled) {
    background-color: #d35400;
}

.korban-btn-secondary {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}

.korban-btn-secondary:hover:not(:disabled) {
    background-color: #e0e0e0;
}

/* Modal overlay */
.korban-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.korban-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Modal content */
.korban-modal-content {
    position: relative;
    background: #fff;
    border-radius: 10px;
    width: 90%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

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

.korban-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.korban-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
}

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

.korban-modal-body {
    padding: 24px;
}

/* Success banner */
.korban-banner {
    padding: 14px 24px;
    font-weight: 600;
    font-size: 14px;
}

.korban-banner-success {
    background-color: #27ae60;
    color: #fff;
}

/* Fieldsets */
.korban-fieldset {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.korban-fieldset legend {
    font-weight: 700;
    font-size: 15px;
    color: #333;
    padding: 0 8px;
}

/* Form groups */
.korban-form-group {
    margin-bottom: 16px;
}

.korban-form-group:last-child {
    margin-bottom: 0;
}

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

.korban-form-group label .required {
    color: #e74c3c;
}

.korban-form-group select,
.korban-form-group input[type="text"],
.korban-form-group input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.korban-form-group select:focus,
.korban-form-group input:focus {
    border-color: #e67e22;
    outline: none;
    box-shadow: 0 0 0 2px rgba(230, 126, 34, 0.15);
}

.korban-form-group select:disabled {
    background-color: #f5f5f5;
    color: #999;
}

/* Error state */
.korban-error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.15) !important;
}

/* Price display */
.korban-price {
    background-color: #eafaf1;
    border: 1px solid #27ae60;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.korban-price-label {
    font-weight: 600;
    color: #333;
}

.korban-price-value {
    font-size: 20px;
    font-weight: 700;
    color: #27ae60;
}

/* Addons */
.korban-addons-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.korban-addon-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
}

.korban-addon-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.korban-addon-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.korban-addon-price {
    font-size: 13px;
    color: #777;
}

.korban-btn-addon {
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 20px;
    background-color: #e67e22;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.korban-btn-addon:hover {
    background-color: #d35400;
}

.korban-btn-addon.active {
    background-color: #e74c3c;
}

.korban-btn-addon.active:hover {
    background-color: #c0392b;
}

.korban-addon-amount {
    width: 140px;
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-top: 4px;
}

.korban-addon-amount.korban-error {
    border-color: #e74c3c;
    background-color: #fdecea;
}

.korban-addon-amount[readonly] {
    background-color: #f2f2f2;
    cursor: not-allowed;
}

/* Participant counter */
.korban-participant-counter {
    background-color: #eaf2f8;
    border: 1px solid #3498db;
    border-radius: 6px;
    padding: 10px 16px;
    margin-bottom: 20px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.korban-participant-counter span {
    color: #3498db;
    font-size: 16px;
}

/* Loading spinner */
.korban-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: korban-spin 0.6s linear infinite;
    vertical-align: middle;
}

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

/* Loading state on form groups */
.korban-loading {
    position: relative;
}

.korban-loading::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-top-color: #e67e22;
    border-radius: 50%;
    animation: korban-spin 0.6s linear infinite;
}

/* Form actions */
.korban-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 10px;
}

/* Responsive */
@media (max-width: 600px) {
    .korban-modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 8px;
    }

    .korban-modal-body {
        padding: 16px;
    }

    .korban-form-actions {
        flex-direction: column;
    }

    .korban-form-actions .korban-btn {
        width: 100%;
        text-align: center;
    }
}
