/* epos.css - EPOS Payment Module Styles - Final Design with Radio Buttons */

/* =========== BASE CONTAINER =========== */
.module-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* =========== FORM STYLES =========== */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #374151;
    font-size: 15px;
}

.form-required {
    color: #dc2626;
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* =========== DEVICE CARDS GRID - BLOCK DISPLAY =========== */
.device-cards-grid {
    display: block;
    margin-top: 16px;
}

/* Device Card */
.device-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.device-card:last-child {
    margin-bottom: 0;
}

.device-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.device-card.selected {
    border: 2px solid #3b82f6;
    background: #f8fafc;
}

/* Card Header - Flex to position radio button and settlement badge */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

/* Radio Button Container */
.radio-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.device-card.selected .radio-custom {
    border-color: #3b82f6;
}

.device-card.selected .radio-custom::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #3b82f6;
    border-radius: 50%;
}

/* Gateway Name */
.gateway-name {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

/* Settlement Badge - Now on right side */
.settlement-badge {
    display: inline-block;
    background: #e5e7eb;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
}

/* Gateway Type */
.gateway-type {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    padding-left: 32px;
}

/* Charges Container - Show all charges */
.charges-container {
    margin: 12px 0;
    padding-left: 32px;
}

.charge-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #f0f0f0;
}

.charge-item:last-child {
    border-bottom: none;
}

.charge-name {
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
}

.charge-rate {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.charge-rate .deduct {
    color: #059669;
}

.charge-rate .gst {
    color: #7c3aed;
    font-size: 11px;
}

/* =========== BUTTON STYLES =========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 40px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: white;
    color: #475569;
    border: 2px solid #e2e8f0;
    border-radius: 40px;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

/* =========== LOADING SPINNER =========== */
.loading-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* =========== MODAL OVERLAYS =========== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.hidden {
    display: none !important;
}

/* =========== ANIMATIONS =========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========== RESPONSIVE DESIGN =========== */
@media (max-width: 768px) {
    .module-container {
        padding: 16px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .charges-container,
    .gateway-type {
        padding-left: 28px;
    }
}

@media (max-width: 480px) {
    .module-container {
        padding: 12px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .gateway-name {
        font-size: 16px;
    }
    
    .charges-container,
    .gateway-type {
        padding-left: 24px;
    }
}

/* =========== UTILITY CLASSES =========== */
.text-center {
    text-align: center;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-800 {
    color: #1f2937;
}

.text-green-600 {
    color: #059669;
}

.text-blue-600 {
    color: #2563eb;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-3 {
    gap: 12px;
}

.mr-2 {
    margin-right: 8px;
}

.mt-1 {
    margin-top: 4px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-6 {
    margin-top: 24px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.p-4 {
    padding: 16px;
}

.p-6 {
    padding: 24px;
}

.p-8 {
    padding: 32px;
}

.py-8 {
    padding-top: 32px;
    padding-bottom: 32px;
}

.pl-3 {
    padding-left: 12px;
}

.pl-10 {
    padding-left: 40px;
}

.pr-4 {
    padding-right: 16px;
}

.w-full {
    width: 100%;
}

.max-w-sm {
    max-width: 384px;
}

.max-w-md {
    max-width: 448px;
}

.max-w-4xl {
    max-width: 896px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.inset-y-0 {
    top: 0;
    bottom: 0;
}

.left-0 {
    left: 0;
}

.pointer-events-none {
    pointer-events: none;
}