/* =============================================
   Adoma File Manager - Main Stylesheet
   Version: 1.2
   Author: Adam Maged
============================================= */

/* =====================
   Base Styles
===================== */

.page-id-49734 .media img {
	height: 100px !important;
}









.afm-file-page {
    display: flex;
    justify-content: center;
    background: #f5f5f5;
    padding: 30px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
  min-height: 580px !important;
}

.afm-file-container {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    width: 95%;
    max-width: 900px;
    margin: 0 auto;
}

.afm_file-template-default2 #footer-page2 {
	bottom: 0 !important;
	position: fixed !important;
	width: 100% !important;
}

#top.page-id-49690 {direction:ltr !important;}

/* =====================
   Typography
===================== */
.afm-file-title {
    text-align: center;
    font-size: 28px;
    #margin-bottom: 30px;
    color: #2c3e50;
    #padding-bottom: 15px;
    #border-bottom: 1px solid #eee;
}

.afm-file-card strong {
    color: #2c3e50;
    font-weight: 600;
}

.afm-description {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
    border-left: 4px solid #0073aa;
}

/* =====================
   Layout Components
===================== */
.afm-file-card {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    direction: ltr !important;
}

.afm-file-left {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start !important;
}

.afm-file-right {
    flex: 2;
    min-width: 250px;
}

/* =====================
   Logo Styles
===================== */
.afm-logo {
    max-width: 100%;
    max-height: 200px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    object-fit: contain;
}

/* =====================
   File Actions
===================== */
.afm-file-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.afm-file-name {
    font-weight: bold;
    color: #333;
    flex: 1;
    min-width: 200px;
    word-break: break-all;
}

.afm-action-buttons {
    display: flex;
    gap: 15px;
}

.afm-preview-btn,
.afm-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.afm-preview-btn {
    background: #3498db;
    color: white;
}

.afm-download-btn {
    background: #2ecc71;
    color: white;
}

.afm-preview-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.afm-download-btn:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

/* =====================
   Responsive Design
===================== */
@media (max-width: 768px) {
    .afm-file-card {
        flex-direction: column;
	direction: ltr !important;
    }
    
    .afm-file-left,
    .afm-file-right {
        flex: 1 1 100%;
    }
    
    .afm-file-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .afm-action-buttons {
        margin-top: 10px;
    }
}

/* =====================
   Form Styles (for upload form)
===================== */
#afm-upload-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#afm-upload-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

#afm-upload-form input[type="text"],
#afm-upload-form input[type="email"],
#afm-upload-form input[type="url"],
#afm-upload-form select,
#afm-upload-form textarea {
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
    text-align: left !important;
}

#afm-upload-form input[type="text"]:focus,
#afm-upload-form input[type="email"]:focus,
#afm-upload-form input[type="url"]:focus,
#afm-upload-form select:focus,
#afm-upload-form textarea:focus {
    border-color: #0073aa;
    outline: none;
}

#afm-upload-form textarea {
    min-height: 120px;
    resize: vertical;
}

#afm-upload-form input[type="file"] {
    margin-bottom: 20px;
}

#afm-upload-form input[type="submit"] {
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

#afm-upload-form input[type="submit"]:hover {
    background: #005e8a;
}

.afm-description-content {
    white-space: pre-line; /* يحترم الأسطر الجديدة والمسافات */
    line-height: 1.6;
    margin-top: 10px;
}

.typewriter-content {
    white-space: pre-wrap; /* يحافظ على المسافات والأسطر */
    line-height: 1.6;
}

.typewriter-content br {
    display: block;
    content: "";
    margin-bottom: 12px;
}



/* Full-width Group */
.afm-full-width-group {
    padding: 0 25px;
    margin: 20px 0;
    grid-column: 1 / -1;
}

.afm-full-width-group .afm-textarea {
    min-height: 150px;
    width: 100%;
}

/* Responsive Adjustments */
@media (max-width: 782px) {
    .afm-full-width-group {
        padding: 0 15px;
    }
    
    .afm-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Enhanced Textarea Styling */
.afm-textarea {
    transition: all 0.3s ease;
    border: 1px solid #ddd;
    padding: 12px;
}

.afm-textarea:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}


/* تنسيق التصنيفات المتدرجة */
.afm-category-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .afm-category-group {
        grid-template-columns: 1fr;
    }
}

.afm-subcategory-loading {
    position: relative;
}

.afm-subcategory-loading::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* هيكل أساسي */
.afm-upload-wrapper {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.afm-upload-header {
    padding: 20px;
    background: #0073aa;
    color: white;
    position: relative;
}

.afm-upload-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.afm-progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.3);
    margin-top: 15px;
    border-radius: 2px;
    overflow: hidden;
}

.afm-progress-fill {
    height: 100%;
    width: 0;
    background: #fff;
    transition: width 0.3s ease;
}

/* نظام الشبكة */
.afm-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 25px;
}

@media (max-width: 768px) {
    .afm-form-grid {
        grid-template-columns: 1fr;
    }
}

.afm-form-group {
    margin-bottom: 20px;
}

/* حقول الإدخال */
.afm-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.afm-input, .afm-select, .afm-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: all 0.3s;
}

.afm-input:focus, .afm-select:focus, .afm-textarea:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
    outline: none;
}

.afm-textarea {
    min-height: 120px;
    resize: vertical;
}

/* رفع الملفات */
.afm-file-upload {
    position: relative;
}

.afm-upload-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f5f5f5;
    border: 2px dashed #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.afm-upload-label:hover {
    border-color: #0073aa;
    background: #f0f7fc;
}

.afm-file-input {
    position: absolute;
    opacity: 0;
    width: 0.1px;
    height: 0.1px;
}

.afm-preview {
    margin-top: 10px;
}

.afm-preview-image {
    max-width: 100%;
    max-height: 150px;
    border-radius: 4px;
    border: 1px solid #eee;
}

.afm-file-info {
    margin-top: 10px;
    font-size: 14px;
}

/* قسم الاتصال */
.afm-contact-section {
    padding: 0 25px 25px;
    border-top: 1px solid #eee;
}

.afm-contact-section h3 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.afm-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* تذييل النموذج */
.afm-form-footer {
    padding: 20px 25px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.afm-submit-button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.afm-submit-button:hover {
    background: #005e8a;
    transform: translateY(-2px);
}

.afm-required-hint {
    font-size: 13px;
    color: #666;
}

/* أيقونات دشبورد */
.dashicons {
    font-size: 18px;
    width: auto;
    height: auto;
}



/* Full-width Group */
.afm-full-width-group {
    padding: 0 25px;
    margin: 20px 0;
    grid-column: 1 / -1;
}

.afm-full-width-group .afm-textarea {
    min-height: 150px;
    width: 100%;
}

/* Responsive Adjustments */
@media (max-width: 782px) {
    .afm-full-width-group {
        padding: 0 15px;
    }
    
    .afm-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Enhanced Textarea Styling */
.afm-textarea {
    transition: all 0.3s ease;
    border: 1px solid #ddd;
    padding: 12px;
}

.afm-textarea:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}


.typewriter-content {
    white-space: pre-wrap; /* يحافظ على المسافات والأسطر */
    line-height: 1.6;
    margin-top: 10px;
}

.typewriter-content br {
    display: block;
    content: "";
    margin-bottom: 12px; /* زيادة المسافة بين الأسطر */
}

.typewriter-cursor::after {
    content: "|";
    animation: blink 1s infinite;
    color: #0073aa;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}


.afm-edit-link-container {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.afm-edit-link {
    display: inline-block;
    padding: 8px 15px;
    background-color: #2271b1;
    color: white !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.afm-edit-link:hover {
    background-color: #135e96;
}

.afm-edit-link .dashicons {
    font-size: 16px;
    vertical-align: middle;
    margin-left: 5px;
}
.typewriter-content strong {
    font-weight: bold;
    color: #2c3e50; /* لون داكن للجزء البولد */
}

.typewriter-content {
    white-space: pre-wrap;
    line-height: 1.6;
}



.afm-description .typewriter-content {
    direction: ltr; /* أو rtl حسب اللغة */
    line-height: 1.6;
    text-align: left;
    white-space: pre-wrap; /* للحفاظ على الأسطر */
    text-indent: -1em;     /* يرفع السطر الأول */
    padding-left: 1em;     /* يُدخل الأسطر التالية */
}

.afm-description {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 1em 1.5em;
    border-left: 5px solid #006699;
    font-family: sans-serif;
    color: #333;
}

.typewriter-content p {
    margin: 0 0 0.7em;
    text-align: left;
    line-height: 1.6;
    text-indent: -1.5em;
    padding-left: 1.5em;
    white-space: pre-wrap;
}

.typewriter-content strong {
    font-weight: 700;
    color: #1e3a5f;
}




.typewriter-content p {
    position: relative;
    margin: 0 0 0.7em;
    text-align: left;
    line-height: 1.6;
    text-indent: -1.5em;
    padding-left: 2em; /* زادنا المسافة عشان البولت */
    white-space: pre-wrap;
}

.typewriter-content p::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: #006699; /* لون البولت */
    font-weight: bold;
    font-size: 1em;
    line-height: 1.6;
}

.afm-edit-btn-container {
    margin: 25px 0;
    text-align: center;
}

.afm-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #2184f7;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.afm-edit-btn:hover {
    background: #1a6bc9;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.afm-edit-btn .dashicons {
    font-size: 16px;
    height: auto;
    width: auto;
}


/* تنسيق قسم الصورة */
.afm-file-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

/* تنسيق زر التعديل */
.afm-edit-btn-container {
    width: 100%;
    text-align: center;
    margin-top: 10px;
}

.afm-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 15px;
    width: 80%;
    max-width: 200px;
    background: #2184f7;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.afm-edit-btn:hover {
    background: #1a6bc9;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.afm-edit-btn .dashicons {
    font-size: 16px;
    height: auto;
    width: auto;
}

.afm-inline-notice {
	position: absolute;
	right: 0;
	top: 0;
	max-width: 50%;
	padding: 17px;
}


.afm-select[multiple] {
    height: auto;
    min-height: 100px;
    padding: 5px;
}

.afm-select[multiple] option {
    padding: 5px;
    margin: 2px 0;
}

/* تنسيقات متعددة الاختيار */
.afm-multiselect-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
    background: #f9f9f9;
    margin-top: 5px;
}

.afm-checkbox-label {
    display: block;
    padding: 8px 10px;
    margin: 2px 0;
    background: #fff;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

.afm-checkbox-label:hover {
    background: #f0f0f0;
}

.afm-checkbox-label input {
    margin-right: 8px;
}

.afm-no-subcategories {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 15px;
}

/* شريط التمرير */
.afm-multiselect-container::-webkit-scrollbar {
    width: 8px;
}

.afm-multiselect-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.afm-multiselect-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.afm-multiselect-container::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}



