/**
 * Additional Component Styles
 * Premium Antique Jewellery E-commerce
 */

/* ============================================
   ALERTS & NOTIFICATIONS
   ============================================ */
.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 500;
    animation: slideInDown 0.3s ease;
}

.alert i {
    font-size: 1.25rem;
}

.alert-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.alert-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.alert-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.alert-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--color-matte-black);
}

.form-label.required::after {
    content: '*';
    color: var(--color-deep-emerald);
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 1rem;
    font-family: var(--font-body);
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-md);
    background: white;
    transition: all var(--transition-base);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-deep-emerald);
    box-shadow: 0 0 0 3px rgba(13, 59, 46, 0.1);
}

.form-control.error {
    border-color: #ef4444;
}

.form-control.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-text {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: 0.875rem;
    color: #6b7280;
}

.form-error {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: 0.875rem;
    color: #ef4444;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.checkbox-wrapper,
.radio-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.checkbox-wrapper input[type="checkbox"],
.radio-wrapper input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.newsletter-form {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.newsletter-form input {
    flex: 1;
    padding: var(--spacing-sm);
    border: 2px solid rgba(255, 254, 247, 0.3);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--color-milky-white);
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: var(--spacing-md) 0;
    list-style: none;
    background: transparent;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: '/';
    padding: 0 var(--spacing-sm);
    color: #9ca3af;
}

.breadcrumb-item a {
    color: var(--color-charcoal);
    transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
    color: var(--color-deep-emerald);
}

.breadcrumb-item.active {
    color: var(--color-deep-emerald);
    font-weight: 600;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xl);
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--spacing-sm);
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-md);
    color: var(--color-charcoal);
    font-weight: 600;
    transition: all var(--transition-base);
}

.pagination a:hover {
    border-color: var(--color-deep-emerald);
    background: var(--gradient-emerald);
    color: var(--color-milky-white);
    transform: translateY(-2px);
}

.pagination .active {
    border-color: var(--color-deep-emerald);
    background: var(--gradient-emerald);
    color: white;
}

.pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   STAR RATING
   ============================================ */
.star-rating {
    display: inline-flex;
    gap: 2px;
}

.star-rating i {
    font-size: 1rem;
}

.star-rating-large i {
    font-size: 1.5rem;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--radius-sm);
}

.badge-primary {
    background: var(--gradient-emerald);
    color: var(--color-milky-white);
}

.badge-secondary {
    background: var(--gradient-emerald-dark);
    color: var(--color-milky-white);
}

.badge-success {
    background: #10b981;
    color: white;
}

.badge-danger {
    background: #ef4444;
    color: white;
}

.badge-warning {
    background: #f59e0b;
    color: white;
}

.badge-info {
    background: #3b82f6;
    color: white;
}

/* ============================================
   MODALS
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-modal);
    overflow: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: var(--z-modal-backdrop);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    z-index: var(--z-modal);
    animation: fadeInUp 0.3s ease;
}

.modal-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--color-deep-emerald);
}

.modal-body {
    padding: var(--spacing-lg);
}

.modal-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(13, 59, 46, 0.2);
    border-top-color: var(--color-deep-emerald);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
}

/* ============================================
   TOOLTIPS
   ============================================ */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--color-matte-black);
    color: white;
    font-size: 0.875rem;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
    z-index: var(--z-tooltip);
}

[data-tooltip]:hover::before {
    opacity: 1;
}

/* ============================================
   TABLES
   ============================================ */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--spacing-lg);
}

.table th,
.table td {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    background: var(--color-milky-white);
    font-weight: 700;
    color: var(--color-matte-black);
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.table tbody tr:hover {
    background: rgba(13, 59, 46, 0.05);
}

.table-striped tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 1024px) {
    .hide-lg {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .hide-md {
        display: none !important;
    }

    .modal-content {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .hide-sm {
        display: none !important;
    }

    .btn-lg {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 1rem;
    }
}