/* majdoun-style.css */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

:root {
    --primary-color: #0D1B4B;
    --accent-color: #0D1B4B;
    --accent-light: #F1F5F9;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --error-color: #ef4444;
    --success-color: #0D1B4B;
    
    --font-family: 'Tajawal', sans-serif;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    direction: rtl;
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0.5rem;
    font-size: 0.9rem;
}

.registration-container {
    width: 100%;
    max-width: 700px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    position: relative;
    animation: fadeIn 0.5s ease-out;
}

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

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.institution-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.institution-logo img {
    height: 35px;
    width: auto;
}

.institution-text {
    display: flex;
    flex-direction: column;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 700;
    line-height: 1.2;
}

.institution-text span:first-child {
    color: var(--accent-color);
}

.logo-wrapper {
    text-align: left;
}

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

h1 {
    font-size: 1.25rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1.25rem;
    font-weight: 800;
    line-height: 1.4;
}

.intro-text {
    background: linear-gradient(to bottom, #ffffff, #f8fafc);
    padding: 1.5rem 2.5rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--primary-color);
    text-align: center;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border-color);
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.intro-text::before {
    content: '«';
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
    font-size: 2rem;
    color: var(--accent-color);
    opacity: 0.2;
}

.intro-text::after {
    content: '»';
    position: absolute;
    left: 0.75rem;
    bottom: -0.5rem;
    font-size: 2rem;
    color: var(--accent-color);
    opacity: 0.2;
}

.notes-section {
    background: #fff9f0;
    border: 1px solid #ffedcc;
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 2.5rem;
}

.notes-title {
    color: #b45309;
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notes-title::before {
    content: '⚠️';
}

.notes-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notes-section li {
    font-size: 0.85rem;
    color: #92400e;
    margin-bottom: 0.5rem;
    position: relative;
    padding-right: 1.25rem;
    line-height: 1.6;
}

.notes-section li::before {
    content: '•';
    position: absolute;
    right: 0;
    color: #d97706;
    font-weight: bold;
}

.notes-section li:last-child {
    margin-bottom: 0;
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 2px;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.85rem;
}

input[type="text"],
input[type="tel"],
input[type="number"],
select {
    width: 100%;
    padding: 0.65rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: var(--font-family);
    font-size: 0.9rem;
    transition: var(--transition);
    background: #fcfcfc;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230D1B4B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 1.25rem center;
    background-size: 1rem;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(13, 27, 75, 0.1);
    background: #fff;
}

/* Toggle Buttons Style */
.toggle-group {
    display: flex;
    gap: 0.5rem;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: var(--radius);
}

.toggle-btn {
    flex: 1;
    padding: 0.5rem;
    border: none;
    background: transparent;
    border-radius: calc(var(--radius) - 4px);
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
}

.toggle-btn.active {
    background: #fff;
    color: var(--primary-color);
    box-shadow: var(--shadow);
}

/* Priority Selectors */
.priority-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.priority-badge {
    width: 32px;
    height: 32px;
    background: #64748b;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Checkbox Groups */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition);
    font-size: 0.85rem;
}

.checkbox-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.helper-text {
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.7;
}

.helper-note {
    font-size: 0.75rem;
    color: #b45309;
    background: #fffbeb;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border-right: 3px solid #f59e0b;
}

.checkbox-item:hover {
    background: #f8fafc;
}

.checkbox-item input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-color);
    margin-top: 0.2rem;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-family);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.submit-btn:hover {
    background: #15296b;
    transform: translateY(-2px);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Success Container Mode */
.registration-container.success-mode {
    max-width: 450px;
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(13, 27, 75, 0.1), 0 10px 10px -5px rgba(13, 27, 75, 0.04);
    border: 1px solid rgba(13, 27, 75, 0.08);
    background: #ffffff;
    animation: successPop 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}

.registration-container.success-mode > :not(#successCard) {
    display: none !important;
}

@keyframes successPop {
    0% {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Success Card Content Styling */
.success-card {
    display: none;
    text-align: center;
}

.registration-container.success-mode .success-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.success-icon-wrapper {
    width: 76px;
    height: 76px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.success-icon {
    font-size: 2.3rem;
    font-weight: bold;
    line-height: 1;
}

.success-icon-wrapper::after {
    content: '';
    position: absolute;
    inset: -6px;
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    animation: pulseRipple 1.5s infinite ease-out;
}

@keyframes pulseRipple {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.success-title {
    color: var(--primary-color);
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.success-thankyou {
    font-size: 1.05rem;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.success-name {
    color: #10b981;
    font-weight: 700;
    border-bottom: 2px dashed rgba(16, 185, 129, 0.3);
    padding-bottom: 2px;
}

.success-info {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 2rem;
}

/* Reset / Another Registration Button */
.reset-btn {
    width: 100%;
    padding: 0.8rem 1.5rem;
    background: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius);
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.reset-btn:hover {
    background: transparent;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(13, 27, 75, 0.1);
}

.reset-btn:active {
    transform: translateY(1px);
}

.footer-note {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .registration-container {
        padding: 1.5rem;
    }
    
    .form-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .logo-wrapper {
        text-align: center;
    }
    
    h1 {
        font-size: 1.25rem;
    }

    .intro-text {
        padding: 1.5rem 1rem;
    }

    .form-row {
        flex-direction: column;
        gap: 1.25rem;
    }
}
