/* Main styles for third-member application */
body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}

.rtl {
    direction: rtl;
    text-align: right;
}

.ltr {
    direction: ltr;
    text-align: left;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background-color: #fff;
    border-bottom: 1px solid #e7e7e7;
    padding: 15px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    flex: 1 1 auto;
}

.language-selector {
    flex: 0 0 auto;
    width: auto;
    max-width: 150px;
}

/* In LTR mode: logo left, button right */
body.ltr .header-content {
    flex-direction: row;
}

body.ltr .logo {
    order: 1;
}

body.ltr .language-selector {
    order: 2;
}

/* In RTL mode: button left, logo right */
body.rtl .header-content {
    flex-direction: row-reverse;
}

body.rtl .logo {
    order: 2;
}

body.rtl .language-selector {
    order: 1;
}

.logo img {
    max-height: 60px;
}

.form-container {
    background-color: #fff;
    border-radius: 5px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.instructions {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #0056b3;
}

h1 {
    color: #0056b3;
    margin-bottom: 20px;
}

h2 {
    color: #343a40;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

label {
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

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

.file-list {
    margin-top: 10px;
}

.file-list .file-item {
    background-color: #f8f9fa;
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-list .remove-file {
    color: #dc3545;
    cursor: pointer;
}

.btn-submit {
    background-color: #0056b3;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #004494;
}

/* Voting page styles */
.application-card {
    background-color: #fff;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.vote-buttons {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.btn-vote {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.btn-yes {
    background-color: #28a745;
    color: white;
}

.btn-no {
    background-color: #dc3545;
    color: white;
}

.btn-disabled {
    background-color: #6c757d;
    color: white;
    opacity: 0.65;
    cursor: not-allowed;
}

/* Results page styles */
.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th, .results-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e7e7e7;
}

.results-table th {
    background-color: #f8f9fa;
}

.results-table tr:hover {
    background-color: #f5f5f5;
}

/* Login form styles */
.login-form {
    max-width: 400px;
    margin: 50px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Alert messages */
.alert {
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .language-selector {
        margin: 15px 0;
    }
    
    .form-container {
        padding: 15px;
    }
}

/* Form validation styles */
.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

.invalid-feedback.d-block {
    display: block !important;
}

/* RTL support for validation messages */
body.rtl .invalid-feedback {
    text-align: right;
}

body.ltr .invalid-feedback {
    text-align: left;
}