/**
 * استایل‌های عمومی افزونه رسآ
 *
 * @package    Rasa
 * @subpackage Rasa/public/css
 */

/* استایل‌های عمومی کلاس‌ها */
.rasa-join-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
}

.rasa-join-box {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.rasa-join-box h2 {
    margin: 0 0 15px 0;
    color: #1d2327;
    font-size: 24px;
}

.rasa-class-description {
    color: #646970;
    margin: 15px 0;
    line-height: 1.6;
}

.rasa-join-button {
    display: inline-block;
    background: #2271b1;
    color: #fff;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: background 0.2s;
    margin: 20px 0;
}

.rasa-join-button:hover {
    background: #135e96;
    color: #fff;
}

.rasa-join-link {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dcdcde;
}

.rasa-join-link input {
    font-size: 12px;
    text-align: center;
}

/* صفحه join - طراحی مدرن با انیمیشن */
.rasa-join-page {
    min-height: 100vh;
    background: #1a1a2e;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Background Image with Lights */
.rasa-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    z-index: 0;
    overflow: hidden;
}

.rasa-bg-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(118, 75, 162, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    animation: bgPulse 8s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

/* Lights Overlay */
.rasa-lights-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.rasa-light-bulb {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffd700 0%, #ff8c00 50%, transparent 70%);
    box-shadow: 
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.6),
        0 0 60px rgba(255, 215, 0, 0.4);
    animation: lightBlink 2s ease-in-out infinite;
}

.rasa-light-bulb.light-1 {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.rasa-light-bulb.light-2 {
    top: 25%;
    right: 15%;
    animation-delay: 0.3s;
}

.rasa-light-bulb.light-3 {
    top: 40%;
    left: 20%;
    animation-delay: 0.6s;
}

.rasa-light-bulb.light-4 {
    top: 50%;
    right: 25%;
    animation-delay: 0.9s;
}

.rasa-light-bulb.light-5 {
    bottom: 30%;
    left: 15%;
    animation-delay: 1.2s;
}

.rasa-light-bulb.light-6 {
    bottom: 20%;
    right: 20%;
    animation-delay: 1.5s;
}

.rasa-light-bulb.light-7 {
    top: 10%;
    left: 50%;
    animation-delay: 1.8s;
}

.rasa-light-bulb.light-8 {
    bottom: 15%;
    left: 50%;
    animation-delay: 2.1s;
}

@keyframes lightBlink {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
        box-shadow: 
            0 0 10px rgba(255, 215, 0, 0.4),
            0 0 20px rgba(255, 215, 0, 0.3),
            0 0 30px rgba(255, 215, 0, 0.2);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
        box-shadow: 
            0 0 30px rgba(255, 215, 0, 1),
            0 0 50px rgba(255, 215, 0, 0.8),
            0 0 70px rgba(255, 215, 0, 0.6);
    }
}

/* Site Name */
.rasa-site-name {
    position: relative;
    z-index: 2;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.rasa-join-form-container {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.rasa-join-form-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rasa-join-header {
    text-align: center;
    margin-bottom: 40px;
}

.rasa-icon-wrapper {
    margin-bottom: 20px;
    display: inline-block;
}

.rasa-icon-animated {
    width: 80px;
    height: 80px;
    color: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.6));
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.rasa-title-animated {
    margin: 0 0 15px 0;
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 20px rgba(102, 126, 234, 0.5);
    animation: fadeIn 0.8s ease-out 0.2s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rasa-class-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    animation: fadeIn 0.8s ease-out 0.4s both;
    max-height: 4.8em; /* حدود 3 خط */
    overflow: hidden;
}

.rasa-error-message {
    background: rgba(248, 215, 218, 0.2);
    backdrop-filter: blur(10px);
    color: #ff6b6b;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 107, 107, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.5s ease-out;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.2);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.rasa-error-animated {
    animation: shake 0.5s ease-out;
}

.rasa-join-form {
    direction: rtl;
    text-align: right;
}

.rasa-form-group {
    margin-bottom: 25px;
    animation: fadeIn 0.8s ease-out both;
}

.rasa-form-group-animated:nth-child(1) { animation-delay: 0.1s; }
.rasa-form-group-animated:nth-child(2) { animation-delay: 0.2s; }
.rasa-form-group-animated:nth-child(3) { animation-delay: 0.3s; }

.rasa-form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
}

.rasa-form-group label svg {
    color: rgba(255, 215, 0, 0.9);
    flex-shrink: 0;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

.rasa-form-group label .required {
    color: #dc3232;
    margin-right: 3px;
}

.rasa-form-group input[type="text"],
.rasa-form-group input[type="email"],
.rasa-form-group input[type="password"],
.rasa-form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 15px;
    direction: rtl;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    box-sizing: border-box;
}

/* اطمینان از اینکه فیلدهای ایمیل و رمز از ابتدا همرنگ بقیه هستند */
#email,
#meeting_password {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.rasa-form-group input:focus,
.rasa-form-group select:focus {
    border-color: rgba(102, 126, 234, 0.8);
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.2),
        0 0 20px rgba(102, 126, 234, 0.3);
    outline: none;
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
}

.rasa-form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    opacity: 0.7;
}

/* یکسان‌سازی استایل فیلدهای autofill (جلوگیری از پس‌زمینه زرد/خاکستری مرورگر) */
.rasa-form-group input[type="text"]:-webkit-autofill,
.rasa-form-group input[type="text"]:-webkit-autofill:hover,
.rasa-form-group input[type="text"]:-webkit-autofill:focus,
.rasa-form-group input[type="email"]:-webkit-autofill,
.rasa-form-group input[type="email"]:-webkit-autofill:hover,
.rasa-form-group input[type="email"]:-webkit-autofill:focus,
.rasa-form-group input[type="password"]:-webkit-autofill,
.rasa-form-group input[type="password"]:-webkit-autofill:hover,
.rasa-form-group input[type="password"]:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.1) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    transition: background-color 9999s ease-out 0s;
}

/* فیلد رمز و آیکن نمایش/مخفی کردن */
.rasa-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.rasa-password-wrapper input[type="password"],
.rasa-password-wrapper input[type="text"] {
    padding-right: 40px; /* جا برای آیکن چشم */
}

.rasa-password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rasa-password-toggle svg {
    width: 18px;
    height: 18px;
}

.rasa-field-description {
    margin-top: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.rasa-join-submit-button {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 16px 30px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.rasa-join-submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.rasa-join-submit-button:hover::before {
    left: 100%;
}

.rasa-join-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.rasa-join-submit-button:active {
    transform: translateY(0);
}

.rasa-join-submit-button svg {
    transition: transform 0.3s ease;
}

.rasa-button-animated:hover svg {
    transform: translateX(-5px);
}

/* Responsive */
@media (max-width: 600px) {
    .rasa-join-form-box {
        padding: 30px 20px;
    }
    
    .rasa-title-animated {
        font-size: 24px;
    }
    
    .rasa-icon-animated {
        width: 60px;
        height: 60px;
    }
}