/**
 * Maisara - Islamic Invoice Factoring Platform
 * Custom CSS styles
 */

/* Custom color variables for Islamic theme */
:root {
    --maisara-primary: #217867;
    --maisara-secondary: #2a8c9f;
    --maisara-success: #38a169;
    --maisara-info: #4299e1;
    --maisara-warning: #ecc94b;
    --maisara-danger: #e53e3e;
    --maisara-light: #f7fafc;
    --maisara-dark: #2d3748;
    --maisara-gold: #d4af37;
    --maisara-green: #217867;
    --maisara-teal: #2a8c9f;
}

/* Override Bootstrap primary colors with Islamic theme */
.btn-primary, .bg-primary {
    background-color: var(--maisara-primary) !important;
    border-color: var(--maisara-primary) !important;
}

.btn-outline-primary {
    color: var(--maisara-primary) !important;
    border-color: var(--maisara-primary) !important;
}

.btn-outline-primary:hover {
    background-color: var(--maisara-primary) !important;
    color: #ffffff !important;
}

.text-primary {
    color: var(--maisara-primary) !important;
}

/* Dashboard custom styles */
.custom-card {
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.custom-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Invoice card styles */
.invoice-card {
    border-left: 4px solid var(--maisara-primary);
}

.invoice-card.overdue {
    border-left-color: var(--maisara-danger);
}

.invoice-card.paid {
    border-left-color: var(--maisara-success);
}

.invoice-card.pending {
    border-left-color: var(--maisara-warning);
}

/* Status badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge-approved {
    background-color: rgba(56, 161, 105, 0.1);
    color: var(--maisara-success);
}

.status-badge-pending {
    background-color: rgba(236, 201, 75, 0.1);
    color: var(--maisara-warning);
}

.status-badge-rejected {
    background-color: rgba(229, 62, 62, 0.1);
    color: var(--maisara-danger);
}

.status-badge-funded {
    background-color: rgba(66, 153, 225, 0.1);
    color: var(--maisara-info);
}

/* User avatar */
.avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.avatar-lg {
    width: 60px;
    height: 60px;
}

.avatar-xl {
    width: 120px;
    height: 120px;
}

/* RTL specific adjustments */
html[dir="rtl"] .sidebar-icon {
    margin-left: 0.5rem;
    margin-right: 0;
}

html[dir="rtl"] .me-2, html[dir="rtl"] .me-3 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

html[dir="rtl"] .ms-2 {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

/* Islamic pattern background */
.islamic-pattern-bg {
    background-color: #f7fafc;
    background-image: url('../img/islamic-pattern.svg');
    background-repeat: repeat;
    background-size: 200px;
    background-attachment: fixed;
    opacity: 0.05;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Prayer times widget */
.prayer-times-widget {
    background-color: var(--maisara-light);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.prayer-time {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.prayer-time:last-child {
    border-bottom: none;
}

/* Sharia compliance badge */
.sharia-compliant-badge {
    display: inline-flex;
    align-items: center;
    background-color: rgba(33, 120, 103, 0.1);
    color: var(--maisara-green);
    padding: 0.25rem 0.75rem;
    border-radius: 50rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.sharia-compliant-badge .icon {
    margin-right: 0.25rem;
}

/* Profit rate display */
.profit-rate {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--maisara-green);
}

/* Language switcher */
.language-icon {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    margin-right: 0.5rem;
}

/* Custom accordion for Islamic contracts */
.islamic-contract-accordion {
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 0.75rem;
    overflow: hidden;
}

.islamic-contract-accordion .card {
    border: none;
    background-color: transparent;
}

.islamic-contract-accordion .card-header {
    background-color: rgba(33, 120, 103, 0.05);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding: 1rem;
}

.islamic-contract-accordion .card-body {
    padding: 1.5rem;
}

/* Table styles */
.table-islamic {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.table-islamic thead th {
    background-color: rgba(33, 120, 103, 0.05);
    color: var(--maisara-dark);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
    padding: 1rem;
    border-bottom: 2px solid rgba(33, 120, 103, 0.1);
}

.table-islamic tbody tr {
    transition: background-color 0.2s ease;
}

.table-islamic tbody tr:hover {
    background-color: rgba(33, 120, 103, 0.025);
}

.table-islamic tbody td {
    padding: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    vertical-align: middle;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .table-islamic, .table-islamic thead, .table-islamic tbody, .table-islamic th, .table-islamic td, .table-islamic tr {
        display: block;
    }
    
    .table-islamic thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .table-islamic tr {
        margin-bottom: 1rem;
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: 0.5rem;
        overflow: hidden;
    }
    
    .table-islamic td {
        border: none;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        position: relative;
        padding-left: 50%;
        text-align: left;
    }
    
    .table-islamic td:before {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        left: 1rem;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 600;
        content: attr(data-label);
    }
}

/* Additional Volt styling */

.bg-soft {
    background-color: #f5f8fb;
}

.icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-circle i {
    font-size: 24px;
}

.icon-square {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--maisara-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
}

.icon-md {
    width: 3rem;
    height: 3rem;
}

.w-3 {
    width: 1rem !important;
}

.h-3 {
    height: 1rem !important;
}

.fmxw-500 {
    max-width: 500px;
}

.form-bg-image {
    background-color: #f5f8fb;
}

.text-gray {
    color: var(--bs-gray-600);
}

/* Additional classes for vh heights */
.vh-lg-100 {
    height: auto;
}

@media (min-width: 992px) {
    .vh-lg-100 {
        height: 100vh;
    }
}

/* RTL support for login page */
[dir="rtl"] .form-label {
    text-align: right;
}

[dir="rtl"] .form-check-input {
    float: right;
    margin-left: 0.5em;
    margin-right: -1.5em;
}

/* Additional utility classes */
.alert-inner {
    padding: 0.5rem;
}

/* Add Auth Styles for Volt */

/* Auth Pages */
.form-bg-image {
    background-image: radial-gradient(circle, rgba(148, 163, 184, 0.1) 1px, transparent 1px);
    background-size: 28px 28px;
    background-position: 0 0;
}

.signin-inner {
    max-width: 23rem;
    position: relative;
    z-index: 1;
}

.shadow-soft {
    box-shadow: 0 .25rem 1.875rem rgba(42, 53, 79, .05) !important;
}

.fmxw-500 {
    max-width: 500px !important;
}

.vh-lg-100 {
    height: 100vh !important;
}

.input-group-text {
    border-right: none;
}

.form-control {
    border-left: none;
}

@media (max-width: 992px) {
    .vh-lg-100 {
        height: auto !important;
    }
}

/* RTL Support for Auth Pages */
html[dir="rtl"] .input-group-text {
    border-left: none;
    border-right: 1px solid #d1d5db;
}

html[dir="rtl"] .form-control {
    border-right: none;
    border-left: 1px solid #d1d5db;
}

html[dir="rtl"] .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

html[dir="rtl"] .ms-2 {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

/* Animation for scrolling effects */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* Business Process Flowchart Styles */
.clean-flowchart {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 2rem;
    overflow: visible;
}

.main-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.process-step-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    width: 100%;
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
    animation-delay: calc(var(--animation-order, 0) * 0.2s);
    transition: all 0.3s ease;
}

.step-icon-container {
    background-color: var(--maisara-green);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    flex-shrink: 0;
    font-size: 1.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.process-step {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.25rem;
    flex-grow: 1;
    border-left: 4px solid var(--maisara-green);
}

.step-text {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--maisara-green);
    margin-bottom: 0.5rem;
}

.connector {
    position: relative;
    width: 3px;
    height: 30px;
    background-color: var(--maisara-green);
    margin-left: 24px;
    animation: growConnector 0.5s ease-out;
}

.connector:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid var(--maisara-green);
}

.islamic-models {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.model-item {
    background-color: rgba(33, 120, 103, 0.1);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.model-item:hover {
    background-color: rgba(33, 120, 103, 0.2);
    transform: translateY(-2px);
}

.model-text {
    font-weight: 600;
    color: var(--maisara-green);
    transition: color 0.3s ease;
}

.model-item:hover .model-text {
    color: var(--maisara-green);
}

.model-subtext {
    font-size: 0.8rem;
    color: #6c757d;
    transition: color 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .process-step-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .step-icon-container {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .connector {
        margin-left: 0;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .islamic-models {
        justify-content: center;
    }
    
    .clean-flowchart {
        padding: 1.5rem;
    }
}

/* Additional business process styles */
.process-step-row:hover {
    transform: translateY(-5px);
    box-shadow: none;
}

.process-step-row:hover .step-icon-container {
    transform: scale(1.1);
    box-shadow: none;
}

.process-step-row:hover .step-text {
    color: var(--maisara-green);
}

/* Animation keyframes */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes growConnector {
    from { 
        height: 0; 
        opacity: 0; 
    }
    to { 
        height: 30px; 
        opacity: 1; 
    }
}

/* Fix for container issues */
.container-fluid {
    overflow-x: hidden;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

.process-step-row:nth-child(1) { --animation-order: 1; }
.process-step-row:nth-child(3) { --animation-order: 2; }
.process-step-row:nth-child(5) { --animation-order: 3; }
.process-step-row:nth-child(7) { --animation-order: 4; }
.process-step-row:nth-child(9) { --animation-order: 5; }

/* Pricing card styles */
.pricing-card {
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: visible;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-5px);
}

.pricing-card .card-header {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.pricing-amount {
    padding: 1rem 0;
}

.popular-card {
    transform: translateY(-10px);
    margin-top: 10px;
    border: 2px solid var(--maisara-primary) !important;
}

.popular-card:hover {
    transform: translateY(-15px);
}

.pricing-popular-tag {
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
}

.pricing-popular-tag .badge {
    font-weight: 600;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    padding: 7px 15px;
}

/* Most Popular Badge */
.most-popular-badge {
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    text-align: center;
    background-color: #ffc107;
    color: #212529;
    font-weight: bold;
    font-size: 1rem;
    padding: 5px 15px;
    width: 80%;
    margin: 0 auto;
    border-radius: 30px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 100;
    text-transform: uppercase;
    display: block !important;
    visibility: visible !important;
}

/* Override card overflow for popular card */
.popular-card {
    overflow: visible !important;
    border: 2px solid var(--maisara-primary) !important;
    z-index: 1;
}

/* Enhanced title specific styling */
.enhanced-title {
    display: block !important;
    visibility: visible !important;
    color: var(--maisara-green) !important;
    margin-bottom: 0 !important;
    font-size: 1.5rem !important;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2) !important;
    opacity: 1 !important;
    font-weight: 700 !important;
} 