/**
 * Custom CSS for SAMA Beauty Theme
 *
 * @package SAMA_Beauty
 */

/* Additional custom styles */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Flatpickr Custom Styles */
.flatpickr-calendar {
    box-shadow: none !important;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

.flatpickr-day:hover {
    background: rgba(179, 121, 23, 0.1);
    border-color: var(--color-primary);
}

.flatpickr-time input:hover,
.flatpickr-time input:focus {
    background: rgba(179, 121, 23, 0.05);
}

.flatpickr-time .flatpickr-am-pm:hover,
.flatpickr-time .flatpickr-am-pm:focus {
    background: rgba(179, 121, 23, 0.05);
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(179, 121, 23, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alert styles */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid transparent;
}

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

.alert-error,
.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Form validation */
.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-valid {
    border-color: #28a745;
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    background-color: var(--color-white);
    border: 1px solid #ddd;
    color: var(--color-secondary);
    text-decoration: none;
    border-radius: 5px;
    transition: var(--transition);
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* Comments */
.comment-list {
    list-style: none;
    padding: 0;
}

.comment-list .comment {
    padding: 20px;
    margin-bottom: 20px;
    background-color: var(--color-light-gray);
    border-radius: 10px;
}

.comment-author img {
    border-radius: 50%;
    margin-right: 15px;
}

.comment-metadata {
    font-size: 0.9rem;
    color: var(--color-dark-gray);
    margin-bottom: 10px;
}

.comment-respond {
    margin-top: 40px;
    padding: 30px;
    background-color: var(--color-light-gray);
    border-radius: 10px;
}

/* Back to top button */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 5px 15px rgba(179, 121, 23, 0.3);
}

#backToTop:hover {
    background-color: var(--color-secondary);
    transform: translateY(-5px);
}

#backToTop.show {
    display: flex;
}

/* Archive page */
.archive-description {
    margin-top: 15px;
    color: var(--color-dark-gray);
}

/* Search form */
.search-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 20px 0;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.search-form button {
    padding: 12px 25px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.search-form button:hover {
    background-color: var(--color-secondary);
}

/* Widget styles */
.widget {
    margin-bottom: 30px;
    padding: 25px;
    background-color: var(--color-light-gray);
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-primary);
}

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

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.widget ul li a:hover {
    color: var(--color-primary);
    padding-left: 5px;
}

/* Sidebar specific styles */
.sidebar .widget {
    box-shadow: none;
}

/* Footer Widget Enhancements */
.footer-widget .widget {
    margin-bottom: 0;
}

.footer-widget .widget ul {
    list-style: none;
    padding: 0;
}

.footer-widget .widget ul li {
    margin-bottom: 10px;
    padding: 0;
    border-bottom: none;
}

.footer-widget .widget ul li a {
    color: var(--color-white);
    transition: var(--transition);
    display: inline-block;
}

.footer-widget .widget ul li a:hover {
    color: var(--color-primary);
    padding-left: 5px;
}

.footer-widget .widget_nav_menu ul li {
    list-style: none;
}

/* Mobile menu improvements */
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: var(--color-white);
        padding: 20px;
        margin-top: 15px;
        border-radius: 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

    .navbar-nav .nav-link {
        padding: 10px 0 !important;
    }

    .navbar-nav .nav-link::after {
        display: none;
    }

    .navbar-toggler {
        border: 2px solid var(--color-primary);
        padding: 8px 12px;
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28179, 121, 23, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    #backToTop {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Print styles */
@media print {
    .topbar,
    .site-header,
    .site-footer,
    #backToTop,
    .comments-area {
        display: none;
    }
}
