/* epos.css - EPOS Payment Module Styles */

/* Module 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);
}

.form-control::placeholder {
    color: #9ca3af;
}

/* Select Dropdown Styles */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.5em 1.5em;
    padding-right: 3rem;
}

/* Amount Input Styles */
.amount-input-container {
    position: relative;
}

.amount-input-container .currency-symbol {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-weight: 500;
}

/* Service Info Box */
.service-info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.service-info-box .service-name {
    color: #1e40af;
    font-weight: 600;
    font-size: 14px;
}

.service-info-box .service-slug {
    background: #dbeafe;
    color: #1e40af;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 4px;
}

/* Transaction Summary */
.transaction-summary {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.transaction-summary h4 {
    color: #374151;
    font-weight: 600;
    margin-bottom: 12px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.summary-item .label {
    color: #6b7280;
}

.summary-item .value {
    color: #374151;
    font-weight: 500;
}

.summary-item .amount {
    font-weight: 600;
    color: #059669;
    font-size: 16px;
}

/* Notes Box */
.notes-box {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.notes-box h4 {
    color: #92400e;
    font-weight: 600;
    margin-bottom: 12px;
}

.notes-box ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.notes-box li {
    color: #92400e;
    font-size: 14px;
    margin-bottom: 6px;
    position: relative;
    padding-left: 20px;
}

.notes-box li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #d97706;
    font-size: 16px;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 14px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

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

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.35);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: #475569;
    border: 2px solid #e2e8f0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.btn-sm {
    padding: 12px 24px;
    font-size: 15px;
    border-radius: 12px;
}

/* Transactions List */
.transactions-list {
    max-height: 400px;
    overflow-y: auto;
}

.transaction-item {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
}

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

.transaction-item:hover {
    background-color: #f9fafb;
}

.transaction-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transaction-amount {
    font-weight: 600;
    font-size: 16px;
    color: #059669;
}

.transaction-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-success {
    background: #d1fae5;
    color: #065f46;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

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

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

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    padding: 20px;
    overflow-y: auto;
}

/* Success Modal Details */
.success-details {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 16px;
}

.success-details .detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.success-details .detail-label {
    color: #047857;
}

.success-details .detail-value {
    color: #065f46;
    font-weight: 500;
}

.success-details .detail-value.code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .module-container {
        padding: 20px;
    }
    
    .btn {
        padding: 14px 24px;
        font-size: 16px;
        border-radius: 12px;
    }
    
    .form-control {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .service-info-box,
    .transaction-summary,
    .notes-box {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .module-container {
        padding: 16px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .transaction-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .transaction-status {
        align-self: flex-start;
    }
}

/* Print Styles */
@media print {
    .btn,
    .loading-overlay {
        display: none !important;
    }
    
    .module-container {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}