/* Livewire Custom Styles */

/* Alert Styles for Arabic RTL */
.alert {
    text-align: right;
    direction: rtl;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: none;
    font-family: 'Cairo', sans-serif;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-warning ul {
    list-style-type: none;
    padding-right: 1rem;
    margin: 0;
}

.alert-warning ul li {
    position: relative;
    padding-right: 1.5rem;
    margin-bottom: 0.25rem;
}

.alert-warning ul li::before {
    content: "•";
    color: #ffc107;
    font-weight: bold;
    position: absolute;
    right: 0;
    font-size: 1.2em;
}

.alert .btn-close {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* Loading State Styles */
.btn[wire\:loading\.attr="disabled"][wire\:target="submitForm"] {
    position: relative;
    opacity: 0.8;
}

.btn .fa-spinner {
    animation: spin 1s linear infinite;
}

/* Prevent button click during loading */
.btn[wire\:loading\.attr="disabled"][wire\:target="submitForm"]:disabled {
    pointer-events: none;
    cursor: not-allowed;
}

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

/* Form Validation Styles */
.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
    text-align: right;
    direction: rtl;
}

/* Star Rating Styles */
.star-rating {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 10px 0;
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating label {
    cursor: pointer;
    color: #ddd;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input[type="radio"]:checked ~ label {
    color: #ffc107;
}

.star-rating input[type="radio"]:checked + label {
    color: #ffc107;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .alert {
        font-size: 0.9rem;
        padding: 0.75rem;
    }

    .star-rating label {
        font-size: 1.3rem;
    }
}

/* Animation for success message */
@keyframes slideInFromTop {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert-success {
    animation: slideInFromTop 0.5s ease-out;
}

/* Animation for error message */
@keyframes shake {
    0%, 20%, 40%, 60%, 80% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
}

.alert-danger {
    animation: shake 0.5s ease-out;
}

/* Animation for warning message */
@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    80% {
        transform: translateY(-5px);
    }
}

.alert-warning {
    animation: bounce 0.6s ease-out;
}
