@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200..1000&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Cairo", sans-serif;
    font-optical-sizing: auto;
    background: linear-gradient(135deg, #e4e6ea 0%, #f5f4f7 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #feffff, #fafbfb);
    color: #8f742d;
    padding: 30px 20px;
    text-align: center;
}

.logo {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 2px;
    letter-spacing: 2px;
}

.header-banner-img {
    width: 100%;
    height: auto;
    display: block;
}

.header-banner-img2 {
    width: 25%;
    height: auto;
    display: block;
}

.subtitle {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 15px;
}

.title {
    text-align: center;
    margin-top: 0px;
    font-size: 1.4em;
    line-height: 1.5;
    font-weight: 600;
}

.form-container {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

/* ===== أنماط نوع التسجيل - تصميم أفقي احترافي ===== */
.input-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    text-align: center;
}

.registration-type-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    background: #f8f9fa;
    padding: 4px;
    border-radius: 12px;
    border: 2px solid #29b464;
}

.type-option {
    flex: 1;
    position: relative;
}

.type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.type-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 8px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    font-size: 15px;
}

.type-label:hover {
    border-color: #C9A961;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(201, 169, 97, 0.2);
}

.type-option input[type="radio"]:checked + .type-label {
    border-color: #C9A961;
    background: #29b464;
    box-shadow: 0 2px 10px rgba(201, 169, 97, 0.3);
    font-weight: 600;
}

.type-icon {
    font-size: 20px;
    line-height: 1;
}

.type-title {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    white-space: nowrap;
}

.type-option input[type="radio"]:checked + .type-label .type-title {
    color: #f7f6f4;
    font-weight: 700;
}

/* شارة نوع الزائر في البطاقة */
.visitor-type-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
}

.visitor-type-badge.visitor {
    background: #3498db;
    color: white;
}

.visitor-type-badge.exhibitor {
    background: #e74c3c;
    color: white;
}

.visitor-type-badge.media {
    background: #9b59b6;
    color: white;
}

/* تحسينات للموبايل */
@media (max-width: 768px) {
    .registration-type-container {
        gap: 6px;
        padding: 6px;
    }
    
    .type-label {
        padding: 10px 5px;
        gap: 5px;
    }
    
    .type-icon {
        font-size: 18px;
    }
    
    .type-title {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .type-label {
        flex-direction: column;
        gap: 3px;
        padding: 8px 4px;
    }
    
    .type-icon {
        font-size: 22px;
    }
    
    .type-title {
        font-size: 11px;
    }
}

/* ===== باقي الأنماط ===== */
.input-field {
    font-family: "Cairo", sans-serif;
    text-align: right;
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.input-field:focus {
    outline: none;
    border-color: #C9A961;
    background: white;
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.1);
}

.error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 8px;
    display: none;
    padding: 8px 12px;
    background: #ffe6e6;
    border-radius: 6px;
    border-right: 3px solid #e74c3c;
}

.success-message {
    color: #27ae60;
    font-size: 13px;
    margin-top: 8px;
    display: none;
    padding: 8px 12px;
    background: #e8f5e9;
    border-radius: 6px;
    border-right: 3px solid #27ae60;
    transition: all 0.3s ease;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(39, 174, 96, 0.3);
}

.submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.footer-logos {
    padding: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.logo-item {
    text-align: center;
    font-size: 12px;
    color: #666;
}

/* ID Card Styles */
.id-card-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.id-card {
    background: white;
    width: 400px;
    border-radius: 15px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.id-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #C9A961;
    padding-bottom: 15px;
}

.id-logo {
    font-size: 2em;
    font-weight: bold;
    color: #C9A961;
    margin-bottom: 5px;
}

.id-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.id-info {
    flex: 1;
}

.id-info h3 {
    color: #333;
    margin-bottom: 5px;
}

.id-info p {
    color: #666;
    margin-bottom: 3px;
    font-size: 14px;
}

.qr-section {
    text-align: center;
    margin-left: 20px;
}

.id-footer {
    text-align: center;
    font-size: 12px;
    color: #999;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.print-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px 5px;
}

.close-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px 5px;
}

/* Verification Page */
.verification-container {
    display: none;
    max-width: 600px;
    margin: 50px auto;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.verification-header {
    text-align: center;
    margin-bottom: 30px;
}

.scan-area {
    border: 3px dashed #C9A961;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
}

.verification-result {
    display: block;
    margin-top: 20px;
}

.verification-success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
    padding: 20px;
    border-radius: 10px;
}

.verification-error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
    padding: 20px;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }
    
    .id-card {
        width: 90%;
        margin: 20px;
    }
}

.loading {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #C9A961;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.nav-buttons {
    text-align: center;
    margin: 20px 0;
}

.nav-btn {
    background: #C9A961;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    margin: 0 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: #B8941F;
    transform: translateY(-2px);
}


/* ============ تنسيق إشعار التوست ============ */
.toast {
    position: fixed; /* تثبيت الموضع */
    bottom: 20px; /* في الأسفل */
    left: 50%; /* في المنتصف أفقياً */
    transform: translateX(-50%) translateY(100px); /* بدء التحريك من خارج الشاشة */
    opacity: 0; /* بدء شفاف */
    padding: 15px 25px;
    border-radius: 8px;
    background-color: #333; /* لون افتراضي */
    color: white;
    font-size: 16px;
    font-weight: bold;
    z-index: 1001; /* فوق كل العناصر */
    transition: transform 0.5s ease, opacity 0.5s ease; /* تحريك ناعم */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-right: 5px solid #555;
    max-width: 90%;
    text-align: center;
}

/* حالة الإظهار */
.toast.show {
    transform: translateX(-50%) translateY(0); /* العودة للمكان الأصلي */
    opacity: 1; /* إظهار كامل */
}

/* نوع: نجاح */
.toast.success {
    background-color: #28a745;
    border-right-color: #218838;
}

/* نوع: خطأ */
.toast.error {
    background-color: #dc3545;
    border-right-color: #c82333;
}