/* Common styles */
body {
    font-family: Arial, sans-serif;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
}

.container {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo {
    text-align: center;
    margin-bottom: 20px;
}

.logo img {
    max-width: 200px;
    height: auto;
}

h1 {
    color: #333;
}

.primary {
    background-color: #4CAF50!important;
}

.secondary {
    background-color: #6c757d!important;
}

.button {
    display: inline-block;
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 20px;
}

.button:hover {
    background-color: #45a049;
}

.button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Form styles */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"], input[type="email"], textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}
button:hover {
    background-color: #45a049;
}

textarea {
    height: 100px;
    resize: vertical;
}

/* Message styles */
.message {
    padding: 10px;
    margin: 15px 0;
    border-radius: 4px;
    display: none;
}

.success {
    background-color: #d4edda;
    color: #155724;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Loading spinner styles */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Rating styles */
.rating-group {
    margin-bottom: 20px;
}

.rating-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.rating input {
    display: none;
}

.rating label {
    cursor: pointer;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    font-size: 24px;
    text-align: center;
    line-height: 40px;
    color: #ddd;
}

.rating label:hover,
.rating label:hover ~ label,
.rating input:checked ~ label {
    color: #ffcc00;
}

/* Email template styles */
.email-container {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.email-header {
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    text-align: center;
    border-radius: 5px 5px 0 0;
}

.email-content {
    padding: 20px;
}

.email-footer {
    text-align: center;
    font-size: 12px;
    color: #777;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Invalid link page specific */
.thank-you {
    display: none;
}

h1.error {
    color: #d9534f;
    display: block;
}

h1.success {
    color: #4CAF50;
    display: block;
    text-align: center;
}

#submitButton, .fd{
    width: 100%;
}

/* Language selector styles */
.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-button {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 120px;
    justify-content: space-between;
}

.language-button:hover {
    background-color: #e9ecef;
}

.language-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    border-radius: 4px;
    border: 1px solid #dee2e6;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.language-dropdown-content a {
    color: #495057;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    border-bottom: 1px solid #f8f9fa;
}

.language-dropdown-content a:hover {
    background-color: #f8f9fa;
}

.language-dropdown-content a:last-child {
    border-bottom: none;
}

.language-dropdown.show .language-dropdown-content {
    display: block;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.language-dropdown.show .dropdown-arrow {
    transform: rotate(180deg);
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .language-selector {
    left: 20px;
    right: auto;
}

[dir="rtl"] .language-dropdown-content {
    left: 0;
    right: auto;
}

[dir="rtl"] .rating {
    flex-direction: row;
    justify-content: flex-start;
}

[dir="rtl"] .form-group label {
    text-align: right;
}

[dir="rtl"] input[type="text"],
[dir="rtl"] input[type="email"],
[dir="rtl"] textarea {
    text-align: right;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .language-selector {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 20px;
        text-align: center;
    }

    .language-dropdown-content {
        left: 50%;
        transform: translateX(-50%);
        right: auto;
    }

    [dir="rtl"] .language-dropdown-content {
        left: 50%;
        transform: translateX(-50%);
        right: auto;
    }
}