/* You can write dashboard, front-end main styles and responsive etc
-------------------------------------------------------------- */

/* ========================================
   OTP System Styles
   ======================================== */

.dc-otp-section {
    margin-bottom: 15px;
}

.dc-send-otp-btn {
    background: #28a745 !important;
    color: white !important;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.dc-send-otp-btn:hover {
    background: #218838 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.dc-send-otp-btn:disabled {
    background: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
    pointer-events: none;
}

/* Verified state for OTP button */
.dc-send-otp-btn[title*="تایید"],
.dc-send-otp-btn.otp-verified {
    background: #28a745 !important;
    opacity: 0.5 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
}

.dc-send-otp-btn .loading-text {
    display: none;
}

.dc-otp-input-wrapper {
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dc-otp-input {
    border: 2px solid #ddd;
    transition: border-color 0.3s ease;
    font-size: 16px;
    letter-spacing: 2px;
    font-weight: 500;
}

.dc-otp-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.dc-otp-input[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

.dc-otp-timer {
    color: #28a745;
    font-size: 13px;
    font-weight: 500;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.dc-otp-timer .timer-count {
    font-weight: 700;
    color: #dc3545;
}

/* Success state for OTP input */
.dc-otp-input[style*="border-color: #28a745"],
.dc-otp-input[style*="border-color: rgb(40, 167, 69)"] {
    background-color: #f0fff4;
}

/* Error state for OTP input */
.dc-otp-input[style*="border-color: #dc3545"],
.dc-otp-input[style*="border-color: rgb(220, 53, 69)"] {
    background-color: #fff5f5;
}

/* Email field full width styling */
.dc-registerformgroup .form-group[style*="width: 100%"] {
    clear: both;
    margin-top: 10px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .dc-send-otp-btn {
        font-size: 14px;
        padding: 10px !important;
    }
    
    .dc-otp-input {
        font-size: 18px;
        letter-spacing: 3px;
    }
}

/* ========================================
   Login Tab System
   ======================================== */

.dc-login-tabs {
    display: flex !important;
    gap: 15px !important;
    margin: 0 auto 25px auto !important;
    max-width: 90% !important;
    justify-content: center !important;
    border: none !important;
    border-radius: 0 !important;
}

.dc-login-tab {
    flex: 1 !important;
    padding: 15px 20px !important;
    background: #f8f9fa !important;
    border: 2px solid #dee2e6 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-weight: 600 !important;
    color: #6c757d !important;
    font-size: 15px !important;
    text-align: center !important;
    min-width: 200px !important;
    line-height: 1.5 !important;
}

.dc-login-tab:hover {
    background: #e9ecef !important;
    color: #495057 !important;
    border-color: #adb5bd !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
}

.dc-login-tab.active {
    background: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3) !important;
    transform: scale(1.05) !important;
}

.dc-login-tab i {
    margin-left: 8px !important;
    font-size: 18px !important;
    vertical-align: middle !important;
}

/* Login OTP Section */
.dc-otp-login-section {
    animation: slideDown 0.4s ease;
}

.dc-login-send-otp {
    background: #007bff !important;
    color: white !important;
    border: none;
    transition: all 0.3s ease;
}

.dc-login-send-otp:hover {
    background: #0056b3 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.dc-login-send-otp:disabled {
    background: #6c757d !important;
    cursor: not-allowed;
    opacity: 0.6;
}

.dc-login-otp-field {
    font-size: 18px;
    letter-spacing: 3px;
    text-align: center !important;
    font-weight: 600;
}

.dc-login-otp-timer {
    text-align: center;
    color: #28a745;
    font-size: 13px;
    font-weight: 500;
}

.dc-login-otp-timer .timer-count {
    font-weight: 700;
    color: #dc3545;
}

/* Login mobile field */
.dc-login-mobile {
    direction: rtl !important;
    text-align: right !important;
}

/* Password section animation */
.dc-password-section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Login Tabs Responsive */
@media (max-width: 768px) {
    .dc-login-tabs {
        gap: 10px;
        max-width: 100%;
    }
    
    .dc-login-tab {
        padding: 12px 10px;
        font-size: 13px;
        min-width: auto;
    }
    
    .dc-login-tab i {
        font-size: 16px;
    }
}

/* ========================================
   Dashboard Update Notice Style
   ======================================== */

.dc-updatall h4.dc-update-notice {
    float: left !important;
    padding: 14px 0 !important;
    margin: 0 !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    line-height: 22px !important;
    color: #55595c !important;
}

.dc-updatall h4 {
    font-size: 16px !important;
}

/* Update helper text next to Save & Update buttons - style as h6 */
.dc-updatall > h5,
.dc-updatall h4.dc-update-notice {
    font-family: "header-font" !important;
    font-size: 16px !important; /* h5 requested @16px */
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #55595c !important;
}

/* ========================================
   Enhanced User Type Selection
   ======================================== */

.dc-user-type-section {
    background: #f8f9fa;
    padding: 25px 20px;
    border-radius: 12px;
    margin: 25px 0;
    border: 2px solid #dee2e6;
}

.dc-user-type-section .dc-title {
    margin-bottom: 20px;
    text-align: center;
}

.dc-user-type-section .dc-title h4 {
    color: #212529;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.dc-user-type-hint {
    color: #dc3545;
    font-size: 14px;
    margin: 5px 0 0 0;
    font-weight: 500;
    text-align: center;
}

/* Enhanced Options List */
.dc-enhanced-options {
    display: flex !important;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.dc-user-type-option {
    flex: 1;
    min-width: 200px;
    max-width: 250px;
}

/* Enhanced Radio Buttons */
.dc-radio-enhanced {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

.dc-radio-enhanced input[type="radio"] {
    display: none !important;
}

.dc-radio-enhanced label {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 25px 20px !important;
    background: white !important;
    border: 3px solid #dee2e6 !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    min-height: 140px !important;
    text-align: center !important;
}

.dc-radio-enhanced label i {
    font-size: 42px !important;
    margin-bottom: 12px !important;
    color: #6c757d !important;
    transition: all 0.3s ease !important;
}

.dc-radio-enhanced label span {
    font-size: 17px !important;
    font-weight: 600 !important;
    color: #495057 !important;
    transition: all 0.3s ease !important;
}

/* Hover State */
.dc-radio-enhanced label:hover {
    border-color: #007bff !important;
    background: #f0f7ff !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.2) !important;
}

.dc-radio-enhanced label:hover i {
    color: #007bff !important;
    transform: scale(1.1) !important;
}

.dc-radio-enhanced label:hover span {
    color: #007bff !important;
}

/* Selected/Checked State */
.dc-radio-enhanced input[type="radio"]:checked + label {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    border-color: #0056b3 !important;
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.4) !important;
    transform: translateY(-5px) scale(1.03) !important;
}

.dc-radio-enhanced input[type="radio"]:checked + label i {
    color: white !important;
    transform: scale(1.2) !important;
}

.dc-radio-enhanced input[type="radio"]:checked + label span {
    color: white !important;
}

/* Active/Focus State */
.dc-radio-enhanced input[type="radio"]:focus + label {
    outline: 3px solid rgba(0, 123, 255, 0.3);
    outline-offset: 2px;
}

/* Special styling for Patient (first option) */
.dc-enhanced-options li:first-child .dc-radio-enhanced label {
    border-color: #28a745;
}

.dc-enhanced-options li:first-child .dc-radio-enhanced label:hover {
    border-color: #28a745 !important;
    background: #f0fff4 !important;
}

.dc-enhanced-options li:first-child .dc-radio-enhanced label:hover i,
.dc-enhanced-options li:first-child .dc-radio-enhanced label:hover span {
    color: #28a745 !important;
}

.dc-enhanced-options li:first-child .dc-radio-enhanced input[type="radio"]:checked + label {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important;
    border-color: #1e7e34 !important;
}

/* Special styling for Doctor (second option) */
.dc-enhanced-options li:nth-child(2) .dc-radio-enhanced label {
    border-color: #17a2b8;
}

.dc-enhanced-options li:nth-child(2) .dc-radio-enhanced label:hover {
    border-color: #17a2b8 !important;
    background: #e7f9fc !important;
}

.dc-enhanced-options li:nth-child(2) .dc-radio-enhanced label:hover i,
.dc-enhanced-options li:nth-child(2) .dc-radio-enhanced label:hover span {
    color: #17a2b8 !important;
}

.dc-enhanced-options li:nth-child(2) .dc-radio-enhanced input[type="radio"]:checked + label {
    background: linear-gradient(135deg, #17a2b8 0%, #117a8b 100%) !important;
    border-color: #117a8b !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dc-user-type-section {
        padding: 20px 15px;
    }
    
    .dc-enhanced-options {
        flex-direction: column;
        gap: 12px;
    }
    
    .dc-user-type-option {
        max-width: 100%;
        min-width: auto;
    }
    
    .dc-radio-enhanced label {
        min-height: 110px !important;
        padding: 20px 15px !important;
    }
    
    .dc-radio-enhanced label i {
        font-size: 36px !important;
        margin-bottom: 10px !important;
    }
    
    .dc-radio-enhanced label span {
        font-size: 15px !important;
    }
    
    .dc-user-type-section .dc-title h4 {
        font-size: 18px;
    }
    
    .dc-user-type-hint {
        font-size: 13px;
    }
}

/* Validation State */
.dc-user-type-section.has-error {
    border-color: #dc3545 !important;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.dc-user-type-error-message {
    color: #dc3545;
    font-size: 14px;
    font-weight: 600;
    margin-top: 10px;
    text-align: center;
    display: none;
    animation: fadeIn 0.3s ease;
}

.dc-user-type-section.has-error .dc-user-type-error-message {
    display: block;
}

/* ========================================
   OpenStreetMap (Leaflet) Custom Styles
   ======================================== */

/* Map container fix */
.leaflet-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
}

/* Ensure map displays correctly */
[id*="location-pickr-map"],
[id*="-map"],
.dc-map-holder {
    height: 400px !important;
    width: 100% !important;
    position: relative;
    z-index: 1;
}

/* Map in dashboard */
.dc-dashboardbox [id*="-map"] {
    height: 350px !important;
    border-radius: 8px;
    overflow: hidden;
}

/* Map in profile/details */
.dc-profileholder [id*="-map"],
.dc-doclocation [id*="-map"] {
    height: 300px !important;
    border-radius: 4px;
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.2);
}

.leaflet-popup-content {
    margin: 15px;
    font-family: inherit;
}

/* Leaflet controls */
.leaflet-control-zoom {
    border-radius: 4px !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    border-radius: 0 !important;
}

/* Leaflet attribution */
.leaflet-control-attribution {
    font-size: 10px;
    background: rgba(255,255,255,0.8) !important;
}

/* Fix for RTL sites */
.leaflet-right {
    right: 10px !important;
    left: auto !important;
}

.leaflet-left {
    left: 10px !important;
    right: auto !important;
}

/* Marker shadow */
.leaflet-marker-shadow {
    opacity: 0.4 !important;
}

/* Responsive map */
@media (max-width: 768px) {
    [id*="location-pickr-map"],
    [id*="-map"],
    .dc-map-holder {
        height: 300px !important;
    }
    
    .dc-dashboardbox [id*="-map"] {
        height: 250px !important;
    }
}

/* ========================================
   Patient Profile Form Improvements
   ======================================== */

/* Name base (Prefix) select styling */
.dc-userform select[name="am_name_base"] {
    font-size: 15px;
    font-weight: 500;
    padding: 12px 15px;
}

/* Make form cleaner without Sub Heading field */
.dc-yourdetails.dc-tabsinfo .form-group {
    margin-bottom: 20px;
}

/* Ensure half-width fields are on same line */
.dc-userform .form-group-half {
    width: 48% !important;
    display: inline-block !important;
    float: right !important;
    margin-left: 2% !important;
}

.dc-userform .form-group-half:nth-of-type(odd) {
    margin-left: 0 !important;
}

/* Clear floats after each pair */
.dc-userform fieldset::after {
    content: "";
    display: table;
    clear: both;
}

/* Full-width fields */
.dc-userform .form-group:not(.form-group-half) {
    width: 100% !important;
    clear: both !important;
}

/* National ID section adjustments */
.dc-national-id .form-group-half {
    width: 48% !important;
    float: right !important;
    margin-left: 2% !important;
}
.dc-national-id .form-group-half:last-child {
    margin-left: 0 !important;
}
.dc-national-id #national_id_preview_wrap {
    clear: both;
    margin-top: 10px;
}

/* Status Badge - appears at the bottom after all content */
.dc-national-id .dc-national-id-status-row {
    clear: both;
    display: block;
    width: 100%;
    margin-top: 15px;
    padding-top: 10px;
}
.dc-national-id .dc-status-badge {
    display: inline-block;
    background: #ffc107;
    color: #212529;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .dc-national-id .form-group-half {
        width: 100% !important;
        margin-left: 0 !important;
        float: none !important;
    }
}
/* Select dropdown styling */
.dc-userform .dc-select select {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
}

@media (max-width: 768px) {
    .dc-userform .form-group-half {
        width: 100% !important;
        margin-left: 0 !important;
        float: none !important;
    }
}

/* ========================================
   Account Settings Titles
   ======================================== */

/* Ensure h5 in content titles uses site font */
.dc-tabscontenttitle h5 {
    font-family: "header-font" !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
    color: #333 !important;
}

/* ========================================
   Account Settings Navigation Tabs
   ======================================== */

/* h5 inside navigation tabs */
.dc-dashboardtabs .dc-tabstitle.nav.navbar-nav li.nav-item a h5 {
    font-family: "header-font" !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline !important;
}

/* Active tab - bolder */
.dc-dashboardtabs .dc-tabstitle.nav.navbar-nav li.nav-item a.active h5 {
    font-weight: 600 !important;
}

/* ========================================
   Invoices Table Font - Simple & Direct
   ======================================== */

/* جدول فاکتورها - override Poppins */
table.dc-tablecategories,
table.dc-tablecategories thead,
table.dc-tablecategories tbody,
table.dc-tablecategories thead tr,
table.dc-tablecategories tbody tr,
table.dc-tablecategories thead tr th,
table.dc-tablecategories tbody tr td {
    font-family: "body-font" !important;
}

/* سایز و وزن */
table.dc-tablecategories thead tr th {
    font-size: 14px !important;
    font-weight: 600 !important;
}

table.dc-tablecategories tbody tr td {
    font-size: 14px !important;
    font-weight: 400 !important;
}

/* Utility: force body font on invoice grid */
.dc-body-font,
.dc-body-font * {
    font-family: "body-font" !important;
}

/* ========================================
   FORCE OVERRIDE - Invoices Table Font
   با بالاترین specificity برای override کردن dashboard.css خط 825
   ======================================== */

/* Override Poppins از dashboard.css با specificity بسیار بالا */
html body .dc-dashboardbox.dc-dashboardinvocies .dc-dashboardboxcontent table.dc-tablecategories.dc-body-font thead tr th,
html body .dc-dashboardinvocies .dc-tablecategories.dc-body-font thead tr th,
html body table.dc-tablecategories.dc-body-font thead tr th {
    font-family: "body-font" !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

html body .dc-dashboardbox.dc-dashboardinvocies .dc-dashboardboxcontent table.dc-tablecategories.dc-body-font tbody tr td,
html body .dc-dashboardinvocies .dc-tablecategories.dc-body-font tbody tr td,
html body table.dc-tablecategories.dc-body-font tbody tr td {
    font-family: "body-font" !important;
    font-size: 14px !important;
    font-weight: 400 !important;
}