/* --- General Dialog Styles --- */
.dialog-overlay {
    font-family: 'Vazirmatn';
    box-sizing: border-box;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: opacity 0.3s ease-in-out;
    z-index: 1000;
}
.dialog-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}
.dialog-overlay.hidden .dialog-box {
    transform: scale(0.95);
    opacity: 0;
}
.dialog-box {
    background-color: #fff;
    border-radius: 1rem; /* 16px */
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 26rem; /* 416px */
    margin: auto;
    transform: scale(1);
    opacity: 1;
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* To clip the header's corners */
}

/* --- Custom CSS for Alert Dialog --- */
#alert-dialog-icon-header { display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.alert-dialog-header-success { background-color: #2563eb; }
.alert-dialog-header-error { background-color: #dc2626; }
#alert-dialog-icon svg { height: 3rem; width: 3rem; color: #fff; }
#alert-dialog-content-body { padding: 1.5rem; text-align: center; }
#alert-dialog-title { font-size: 1.5rem; font-weight: 700; color: #1f2937; margin-bottom: 0.75rem; font-family: 'Vazirmatn';}
#alert-dialog-message {font-family: 'Vazirmatn'; color: #4b5563; font-size: 1rem; line-height: 1.625; margin-bottom: 1.5rem; white-space: pre-line; direction: rtl;}
#alert-dialog-footer { display: flex; justify-content: center; }
.alert-dialog-close-button {font-family: 'Vazirmatn'; color: #fff; padding: 0.6rem 2.5rem; border-radius: 9999px; font-weight: 600; border: none; cursor: pointer; transition: background-color 0.2s ease-in-out, transform 0.1s ease; }
.alert-dialog-close-button:active { transform: scale(0.96); }
.alert-dialog-button-success { background-color: #2563eb; }
.alert-dialog-button-success:hover { background-color: #1d4ed8; }
.alert-dialog-button-error { background-color: #dc2626; }
.alert-dialog-button-error:hover { background-color: #b91c1c; }

/* --- Custom CSS for Rules Confirmation Dialog (New Design) --- */
#rules-dialog-icon-header { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 1.5rem; 
    background-color: #16a34a; /* Green header */
}
#rules-dialog-icon svg { 
    height: 3.5rem; 
    width: 3.5rem; 
    color: #fff;
    filter: drop-shadow(0 4px 3px rgba(0,0,0,0.2));
}
#rules-dialog-content-body { 
    padding: 1.5rem; 
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem; /* Consistent spacing between all elements */
}
#rules-dialog-title {font-family: 'Vazirmatn'; font-size: 1.5rem; font-weight: 700; color: #111827; margin: 0; }
#rules-dialog-text {font-family: 'Vazirmatn'; font-size: 1rem; color: #374151; line-height: 1.7; width: 100%; margin: 0; direction: rtl; }
#rules-dialog-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: 'Vazirmatn', sans-serif;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-top: 0.5rem;
    font-family: 'Vazirmatn';
}
#rules-dialog-input:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}
.rules-dialog-button {
    width: 100%;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Vazirmatn';
}
.rules-dialog-button:active { transform: scale(0.97); }
#rules-dialog-accept-btn { 
    background-color: #16a34a; 
    color: #fff; 
    border: 1px solid #16a34a;
    font-family: 'Vazirmatn';
}
#rules-dialog-accept-btn:hover { background-color: #15803d; }
#rules-dialog-close-btn { 
    background-color: #fff;
    color: #4b5563; 
    border: 1px solid #d1d5db;
    font-family: 'Vazirmatn';
}
#rules-dialog-close-btn:hover { background-color: #f3f4f6; }
