/* Jajoorim Factor Plugin Styles */

.jajoorim-factor-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Vazir', 'Tahoma', 'Arial', sans-serif;
    direction: rtl;
    background: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

/* Header Section */
.factor-header {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    padding: 20px;
    color: white;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-section {
    flex-shrink: 0;
}

.jajoorim-logo {
    width: 50px;
    height: 50px;
    background: white;
    color: #FFA500;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    text-transform: uppercase;
    font-family: 'Vazir', 'Tahoma', 'Arial', sans-serif;
    overflow: hidden;
}

.jajoorim-logo .site-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.header-text {
    flex-grow: 1;
}

.document-title {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: bold;
}

.reservation-code {
    font-size: 16px;
    margin-bottom: 5px;
}

.company-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

/* People Section */
.people-section {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.host-guest-container {
    display: flex;
    gap: 20px;
}

.host-section, .guest-section {
    flex: 1;
}

.person-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-details {
    flex-grow: 1;
}

.person-title {
    font-weight: bold;
    color: #495057;
    margin-bottom: 5px;
    font-size: 14px;
}

.person-name, .person-mobile {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 3px;
}

/* Section Styles */
.reservation-info-section,
.accommodation-section,
.regulations-section,
.invoice-section,
.cancellation-section {
    padding: 20px;
    background: #f8f9fa;
    margin-bottom: 1px;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    color: #495057;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #FFA500;
}

/* Reservation Details */
.reservation-details,
.accommodation-details {
    display: flex;
    gap: 20px;
}

.reservation-right, .reservation-left,
.accommodation-right, .accommodation-left {
    flex: 1;
}

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

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

.label {
    font-weight: bold;
    color: #495057;
    font-size: 13px;
}

.value {
    color: #6c757d;
    font-size: 13px;
}

/* Regulations */
.regulations-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.regulation-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border-right: 4px solid #FFA500;
}

.info-icon {
    width: 20px;
    height: 20px;
    background: #FFA500;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 2px;
}

.regulation-text {
    color: #495057;
    line-height: 1.5;
    font-size: 12px;
}

/* Invoice */
.invoice-details {
    background: white;
    border-radius: 8px;
    padding: 15px;
}

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

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

.invoice-label {
    color: #495057;
    font-size: 13px;
}

.invoice-value {
    font-weight: bold;
    color: #495057;
    font-size: 13px;
}

.invoice-item.deduction .invoice-value {
    color: #dc3545;
}

.invoice-item.final {
    background: #e8f5e8;
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
    border: 2px solid #28a745;
}

.invoice-item.final .invoice-value {
    color: #28a745;
    font-size: 18px;
}

/* Cancellation */
.cancellation-details {
    background: white;
    border-radius: 8px;
    padding: 15px;
}

.cancellation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dc3545;
}

.cancellation-title {
    font-weight: bold;
    color: #495057;
    font-size: 14px;
}

.cancellation-policy {
    background: #dc3545;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.cancellation-rules {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cancellation-rule {
    padding: 10px;
    background: #fff3cd;
    border-radius: 6px;
    border-right: 4px solid #ffc107;
}

.rule-text {
    color: #856404;
    line-height: 1.5;
    font-size: 12px;
}

/* Footer */
.factor-footer {
    padding: 20px;
    background: #495057;
    color: white;
    text-align: center;
}

.contact-info {
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .host-guest-container {
        flex-direction: column;
    }
    
    .reservation-details,
    .accommodation-details {
        flex-direction: column;
    }
    
    .cancellation-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Hide admin bar for factor page only for non-admin users */
.jajoorim-factor-page:not(.admin-bar) #wpadminbar {
    display: none !important;
}

/* Show admin bar for admin users on factor page */
.jajoorim-factor-page.admin-bar #wpadminbar {
    display: block !important;
}

/* Reset theme styles for factor page */
.jajoorim-factor-page * {
    box-sizing: border-box;
}

.jajoorim-factor-page body {
    margin: 0 !important;
    padding: 0 !important;
    background: #f8f9fa !important;
}

/* Ensure factor container is properly styled */
.jajoorim-factor-page .jajoorim-factor-container {
    margin: 20px auto !important;
    max-width: 800px !important;
}

/* Hide default header and footer for factor page */
.jajoorim-factor-page .site-header,
.jajoorim-factor-page .site-footer,
.jajoorim-factor-page header,
.jajoorim-factor-page footer,
.jajoorim-factor-page #colophon {
    display: none !important;
}

/* Show only empty header and footer */
.jajoorim-factor-page .site-header_archive {
    display: block !important;
}

/* Hide all footers except empty footer */
.jajoorim-factor-page footer:not(.site-footer-empty),
.jajoorim-factor-page #colophon:not(.site-footer-empty),
.jajoorim-factor-page .site-footer:not(.site-footer-empty) {
    display: none !important;
}

/* Force hide default footer */
.jajoorim-factor-page .site-footer,
.jajoorim-factor-page footer,
.jajoorim-factor-page #colophon {
    display: none !important;
}



/* Print Styles */
@media print {
    .jajoorim-factor-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .factor-header {
        background: #FFD700 !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    
    #wpadminbar {
        display: none !important;
    }
} 