/* Silk Application CSS - Elegant Modern Design */

/* Typography */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

/* Global Variables */
:root {
    --primary-color: #b57edc;
    --primary-light: #d7b1ed;
    --primary-dark: #9150b9;
    --secondary-color: #f8c291;
    --dark-color: #2c3e50;
    --light-color: #f5f6fa;
    --text-color: #333;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;

    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 2rem;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.2);

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    --font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
        sans-serif;
}

/* RTL Support */
html[lang="ar"] {
    direction: rtl;
    font-family: "Tajawal", var(--font-family);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
    background-color: #fff;
    overflow-x: hidden;
    padding-top: 80px; /* For fixed navbar */
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.text-primary {
    color: var(--primary-color) !important;
}
.text-secondary {
    color: var(--secondary-color) !important;
}
.bg-primary {
    background-color: var(--primary-color) !important;
}
.bg-secondary {
    background-color: var(--secondary-color) !important;
}

/* Buttons */
.btn {
    border-radius: var(--radius-md);
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--primary-color);
    color: white;
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--dark-color);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal),
        box-shadow var(--transition-normal);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Forms */
.form-control,
.form-select {
    border-radius: var(--radius-md);
    border: 1px solid #e0e0e0;
    padding: 0.75rem 1rem;
    transition: border-color var(--transition-fast),
        box-shadow var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.25rem rgba(181, 126, 220, 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Navigation */
.navbar {
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--primary-color);
}

.nav-link {
    font-weight: 600;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(181, 126, 220, 0.1);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
}

.dropdown-item {
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background-color: rgba(181, 126, 220, 0.1);
    color: var(--primary-color);
}

/* Alert Messages */
.alert {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

/* Main Content */
main {
    min-height: calc(
        100vh - 80px - 100px
    ); /* Viewport height minus header and footer */
}

.flash-messages {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 1050;
    width: 350px;
    max-width: calc(100% - 40px);
}

.alert-dismissible {
    padding-right: 1rem;
}

.alert-dismissible .btn-close {
    padding: 1rem;
}

/* Footer */
footer {
    background-color: #f8f9fa;
    color: var(--dark-color);
    padding: 4rem 0 2rem;
    margin-top: 3rem;
}

footer h5 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

footer ul li {
    margin-bottom: 0.75rem;
}

footer a {
    color: var(--text-color);
}

footer a:hover {
    color: var(--primary-color);
}

.social-links a {
    display: inline-block;
    width: 36px;
    height: 36px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 36px;
    margin-right: 0.5rem;
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Reservation Calendar */
.calendar-container {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
}

.time-slot {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid #e0e0e0;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.time-slot:hover {
    border-color: var(--primary-color);
    background-color: rgba(181, 126, 220, 0.05);
}

.time-slot.selected {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.time-slot.booked {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    border-color: #ddd;
}

/* Service Cards */
.service-box {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    overflow: hidden;
    height: 100%;
}

.service-box:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-image {
    height: 200px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.service-box:hover .service-image img {
    transform: scale(1.05);
}

.service-content {
    padding: 1.5rem;
}

.service-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Profile Page */
.profile-header {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
}

.profile-nav .nav-link {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
}

/* Badges */
.badge {
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
}

/* Loading Spinner */
.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--primary-light);
    border-bottom-color: var(--primary-color);
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .navbar-collapse {
        background-color: white;
        padding: 1rem;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
        margin-top: 0.5rem;
    }

    .dropdown-menu {
        box-shadow: none;
        border: 1px solid #eee;
    }
}

/* Utility Classes */
.rounded-lg {
    border-radius: var(--radius-lg) !important;
}
.shadow-hover {
    transition: box-shadow var(--transition-fast),
        transform var(--transition-fast);
}
.shadow-hover:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

/* Admin Dashboard Styles */
.sidebar {
    height: calc(100vh - 80px);
    position: sticky;
    top: 80px;
    padding: 1.5rem;
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.sidebar .nav-link {
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    margin-right: 0.5rem;
}

.stats-card {
    background-color: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
}

.stats-card:hover {
    box-shadow: var(--shadow-lg);
}

.stats-card-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(181, 126, 220, 0.1);
    color: var(--primary-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stats-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Special Effects */
.glass-effect {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gradient-text {
    background: linear-gradient(
        135deg,
        var(--primary-color) 0%,
        var(--primary-dark) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Arabic specific adjustments */
html[lang="ar"] .me-2,
html[lang="ar"] .me-3,
html[lang="ar"] .me-md-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

html[lang="ar"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

html[lang="ar"] .text-md-end {
    text-align: left !important;
}

html[lang="ar"] .social-links a {
    margin-right: 0;
    margin-left: 0.5rem;
}

html[lang="ar"] .dropdown-menu-end {
    right: auto !important;
    left: 0 !important;
}
