/* ملف kk.css - تصميم الموقع */

/* نافذة رسائل الخطأ المنبثقة */
.message-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.message-modal {
    background-color: white;
    width: 90%;
    max-width: 450px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}

.message-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.message-header.error {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: white;
}

.message-header.success {
    background: linear-gradient(135deg, #00C851 0%, #007E33 100%);
    color: white;
}

.message-header.info {
    background: linear-gradient(135deg, #33b5e5 0%, #0099CC 100%);
    color: white;
}

.message-header h2 {
    margin: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.message-content {
    padding: 25px;
    text-align: center;
    font-size: 16px;
    color: #333;
    line-height: 1.6;
}

.message-footer {
    padding: 15px 25px;
    background-color: #f5f5f5;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.message-ok-btn {
    background-color: #d32f2f;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    min-width: 120px;
}

.message-ok-btn:hover {
    background-color: #b71c1c;
}

.message-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* نافذة الشروط والأحكام الكبيرة للدخول الأول */
.welcome-terms-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    display: flex;
}

.welcome-terms-modal {
    background-color: white;
    width: 95%;
    max-width: 700px;
    max-height: 85vh;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    animation: modalFadeIn 0.5s ease-out;
}

.welcome-terms-header {
    background: linear-gradient(135deg, #b71c1c 0%, #d32f2f 100%);
    color: white;
    padding: 25px;
    text-align: center;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.welcome-terms-header h2 {
    margin: 0;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.welcome-terms-content {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
    line-height: 1.8;
    font-size: 16px;
    color: #333;
    text-align: right;
}

.welcome-terms-content p {
    margin-bottom: 20px;
    text-align: justify;
    font-size: 16px;
}

.welcome-terms-content strong {
    color: #b71c1c;
    font-size: 18px;
    display: block;
    margin-bottom: 10px;
}

.welcome-terms-footer {
    padding: 20px 30px;
    background-color: #f5f5f5;
    text-align: center;
    border-top: 2px solid #e0e0e0;
}

#acceptWelcomeTermsBtn {
    background-color: #d32f2f;
    color: white;
    border: none;
    padding: 15px 50px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 150px;
    box-shadow: 0 4px 15px rgba(183, 28, 28, 0.3);
}

#acceptWelcomeTermsBtn:hover {
    background-color: #b71c1c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(183, 28, 28, 0.4);
}

/* تصميم حقل رفع الصورة - زر صغير جداً */
.image-upload-container {
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.image-upload-label {
    display: block;
    text-align: center;
    margin-bottom: 10px;
    color: #333;
    font-weight: bold;
    font-size: 14px;
}

.small-upload-button {
    width: 60px;
    height: 60px;
    border: 2px solid #b71c1c;
    border-radius: 50%;
    background-color: #d32f2f;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    padding: 0;
    margin: 0;
    box-shadow: 0 3px 10px rgba(183, 28, 28, 0.3);
}

.small-upload-button.uploaded {
    background-color: #4CAF50;
    border-color: #388E3C;
}

.small-upload-button:hover {
    background-color: #b71c1c;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(183, 28, 28, 0.4);
}

.small-upload-button.uploaded:hover {
    background-color: #45a049;
    box-shadow: 0 5px 15px rgba(56, 142, 60, 0.4);
}

.small-upload-button i {
    font-size: 22px;
    margin-bottom: 2px;
    color: white;
}

.small-upload-text {
    font-size: 9px;
    font-weight: bold;
    text-align: center;
    color: white;
    line-height: 1.1;
    padding: 0 3px;
}

.upload-info-text {
    font-size: 11px;
    color: #666;
    text-align: center;
    margin-top: 8px;
    max-width: 200px;
    line-height: 1.3;
}

.uploaded-file-name {
    margin-top: 10px;
    padding: 6px 10px;
    background: #4CAF50;
    color: white;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
    font-size: 11px;
    display: none;
    max-width: 200px;
    word-break: break-word;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.remove-image {
    margin-top: 6px;
    color: #e74c3c;
    cursor: pointer;
    text-align: center;
    font-size: 10px;
    display: none;
    font-weight: bold;
    text-decoration: underline;
}

/* تصميم النافذة المنبثقة للنتائج */
.results-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.results-modal {
    background-color: white;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalFadeIn 0.3s ease-out;
}

.modal-header {
    background: linear-gradient(135deg, #b71c1c 0%, #d32f2f 100%);
    color: white;
    padding: 20px;
    text-align: center;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.modal-header h2 {
    margin: 0;
    font-size: 22px;
}

.modal-content {
    padding: 25px;
}

.receipt-data {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.data-row:last-child {
    border-bottom: none;
}

.data-label {
    color: #666;
    font-weight: bold;
    font-size: 14px;
}

.data-value {
    color: #d32f2f;
    font-weight: bold;
    font-size: 14px;
    text-align: left;
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 25px;
}

.modal-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.cancel-btn {
    background-color: #e0e0e0;
    color: #333;
}

.cancel-btn:hover {
    background-color: #bdbdbd;
}

.proceed-btn {
    background-color: #d32f2f;
    color: white;
}

.proceed-btn:hover {
    background-color: #b71c1c;
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* زر إلغاء المعاملة الصغير */
.cancel-transaction-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: #d32f2f;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    font-size: 12px;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* الحاوية الجديدة أسفل الصورة */
.info-container {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    margin: 30px auto;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid #d32f2f;
    text-align: center;
}

.info-container h2 {
    color: #b71c1c;
    text-align: center;
    margin-bottom: 15px;
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.info-content {
    text-align: right;
    line-height: 1.6;
    color: #333;
    font-size: 14px;
}

.info-point {
    margin-bottom: 12px;
    padding-right: 15px;
    position: relative;
}

.info-point:before {
    content: "•";
    color: #d32f2f;
    font-size: 20px;
    position: absolute;
    right: 0;
    top: 0;
}

/* تعديلات إضافية لتوسيط العناصر */
body {
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* صورة الهيدر بحجمها الطبيعي */
.header-image {
    display: block;
    margin: 20px auto 0 auto;
    width: 100%;
    max-width: 500px;
    height: auto;
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 40px;
}

/* تعديل حاوية الحقول (زيادة الارتفاع) */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90%;
    max-width: 400px;
    margin-top: 20px;
    margin-bottom: 40px;
    padding: 25px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    min-height: 400px;
}

form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* تعديل حقل إدخال رقم الحساب */
#userID {
    direction: ltr;
    text-align: left;
    width: 100%;
    max-width: 280px;
    box-sizing: border-box;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

#userID:focus {
    border-color: #d32f2f;
    outline: none;
}

#userID.error-input {
    border-color: #ff4444;
}

/* إخفاء رسائل الخطأ القديمة */
.error-message {
    display: none !important;
}

/* إخفاء أي علامات خضراء أو رسائل نجاح */
.result-message,
.result-success,
.result-error {
    display: none !important;
}

/* أيقونات التواصل */
.overlay-icons {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 15px auto;
    padding: 10px;
    z-index: 10;
}

.overlay-icons img {
    width: 35px;
    height: 35px;
    cursor: pointer;
    border-radius: 50%;
    transition: transform 0.3s;
}

.overlay-icons img:hover {
    transform: scale(1.1);
}

/* إصلاحات إضافية */
.intro-text {
    text-align: center;
    margin: 15px 0;
    font-size: 16px;
    color: #333;
}

.line-under-text {
    display: block;
    width: 80%;
    height: 2px;
    background: linear-gradient(to right, transparent, #d32f2f, transparent);
    margin: 10px auto 20px auto;
}

/* مسافات مناسبة بين العناصر */
.info-container {
    margin: 30px auto;
}

/* خلفية الصورة الخلفية */
.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.9;
}

/* شاشة التحميل */
#loadingOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 4000;
    justify-content: center;
    align-items: center;
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #d32f2f;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* تنسيقات إضافية للمربعات والأزرار */
.login-container {
    margin-top: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.login-container input[type="submit"] {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 280px;
    box-shadow: 0 4px 15px rgba(183, 28, 28, 0.3);
}

.login-container input[type="submit"]:hover {
    background: linear-gradient(135deg, #b71c1c 0%, #9c1818 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(183, 28, 28, 0.4);
}

.login-container input[type="submit"]:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* إزالة تصميم مربع الموافقة على الشروط */
.terms-container {
    display: none !important;
}