/* Payment Gateway Portal Custom Styles - Tadawi Redesign */

:root {
    --primary-color: #112344; /* Tadawi Navy Blue */
    --secondary-color: #D22630; /* Tadawi Red */
    --success-color: #43a047; /* Green for success icons */
    --text-color: #333333;
    --text-muted: #666666;
    --border-color: #e0e0e0;
    --bg-color: #f9fafb;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.2s;
}

a:hover {
    color: var(--secondary-color);
}

/* Header */
header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.brand-logo i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

.header-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.main-container {
    width: 100%;
    max-width: 600px; /* Constrain width for card-centric design */
    margin: 0 auto;
}

.main-container-wide {
    max-width: 800px;
}

/* Footer */
footer {
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: auto;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-right {
    color: var(--text-muted);
}

/* Cards */
.tadawi-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0,0,0,0.05);
}

.tadawi-card-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.tadawi-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.tadawi-card-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Status Icons */
.status-icon-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.status-icon {
    font-size: 4rem;
    line-height: 1;
}

.status-icon.success {
    color: var(--success-color);
}

.status-icon.failed {
    color: var(--secondary-color);
}

/* Transaction Summary Table */
.summary-box {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.summary-header {
    background-color: #f1f3f5;
    padding: 0.75rem 1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    color: var(--text-muted);
    font-weight: 500;
}

.summary-value {
    color: var(--text-color);
    font-weight: 600;
    text-align: right;
}

/* Buttons */
.btn-tadawi {
    display: inline-block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-tadawi-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-tadawi-primary:hover {
    background-color: #0a1633;
    color: #ffffff;
}

.btn-tadawi-success {
    background-color: var(--success-color);
    color: #ffffff;
}

.btn-tadawi-success:hover {
    background-color: #388e3c;
    color: #ffffff;
}

.btn-tadawi-danger {
    background-color: var(--secondary-color);
    color: #ffffff;
}

.btn-tadawi-danger:hover {
    background-color: #9f1919;
    color: #ffffff;
}

.btn-link-muted {
    background: none;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 1rem;
    display: inline-block;
    width: auto;
    border: none;
}

.btn-link-muted:hover {
    color: var(--secondary-color);
    background: none;
    text-decoration: underline;
}


/* Form Inputs matching mockup */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9rem;
}

.tadawi-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    color: var(--text-color);
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tadawi-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 27, 62, 0.1);
}

.tadawi-input:disabled {
    background-color: #f5f5f5;
    color: #777;
    cursor: not-allowed;
}

.input-group-row {
    display: flex;
    gap: 1rem;
}

.input-group-col {
    flex: 1;
}

/* Payment Method Selection Styling */
.payment-methods-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-method-option {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: white;
}

.payment-method-option:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.payment-method-icon {
    width: 50px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f3f5;
    border-radius: 4px;
    margin-right: 1rem;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.payment-method-details {
    flex: 1;
}

.payment-method-title {
    font-weight: 600;
    color: var(--text-color);
    display: block;
    margin-bottom: 0.15rem;
}

.payment-method-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.payment-method-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    position: relative;
    margin-left: 1rem;
}

.payment-method-option.selected {
    border-color: var(--primary-color);
    background-color: #f0f4f8;
}

.payment-method-option.selected .payment-method-radio {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
}

.payment-method-option.selected .payment-method-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
}

/* Divider */
.divider-with-text {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.divider-with-text::before,
.divider-with-text::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider-with-text span {
    padding: 0 1rem;
}

/* Loading Spinner Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

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

/* Utilities */
.text-right { text-align: right; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.d-none { display: none !important; }
.w-100 { width: 100%; }

/* Moyasar Form Overrides to match design */
.mysr-form {
    border: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.bg-light-blue {
    background-color: #12417b;
}/* Admin Dashboard Styles - Tadawi Design */

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 1.5rem;
}

.btn-toolbar {
    display: flex;
    gap: 0.5rem;
}

/* Progress bars in admin */
.progress {
    background-color: #e9ecef;
    border-radius: 4px;
}

.progress-bar {
    border-radius: 4px;
}

/* Alert styles */
.alert {
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.alert-dismissible {
    padding-right: 3rem;
}

.btn-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: #666;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.btn-close:hover {
    opacity: 1;
}

/* System Health */
.health-overview {
    text-align: center;
    padding: 2.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.status-healthy {
    background: linear-gradient(135deg, #1cc88a 0%, #169f94 100%);
    color: #fff;
}

.status-degraded {
    background: linear-gradient(135deg, #f6c23e 0%, #dda845 100%);
    color: #fff;
}

.status-error {
    background: linear-gradient(135deg, #e74a3b 0%, #c0392b 100%);
    color: #fff;
}

.health-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.health-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.health-description {
    font-size: 1rem;
    margin-bottom: 0;
}

/* Table styles */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
}

.table td {
    vertical-align: middle;
}

/* Badge styles */
.badge {
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .health-overview {
        padding: 1.5rem;
    }
    
    .health-title {
        font-size: 1.5rem;
    }
    
    .health-icon {
        font-size: 2.5rem;
    }
}
