/**
 * Garage System Button Styles
 * Stiluri pentru butoanele sistemului de garaj
 */

/* Garage button base styles */
.garage-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 0.875rem;
    line-height: 1.25rem;
    min-height: 2.5rem;
}

/* Garage button variants */
.garage-btn-outline {
    background-color: transparent;
    border-color: #d1d5db;
    color: #374151;
}

.garage-btn-outline:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
}

.garage-btn-success {
    background-color: #10b981;
    border-color: #10b981;
    color: white;
}

.garage-btn-success:hover {
    background-color: #059669;
    border-color: #059669;
    color: white;
}

.garage-btn-primary {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.garage-btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
    color: white;
}

/* Small variant */
.garage-btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    line-height: 1rem;
    min-height: 2rem;
}

/* Full width */
.garage-btn-full {
    width: 100%;
}

/* Button with icon */
.garage-btn-icon {
    margin-right: 0.5rem;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.garage-btn-sm .garage-btn-icon {
    width: 1rem;
    height: 1rem;
    margin-right: 0.25rem;
}

/* Loading state */
.garage-btn-loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.garage-btn-loading .garage-btn-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Success animation */
.garage-btn-success-animation {
    animation: garageSuccessPulse 0.6s ease-in-out;
}

@keyframes garageSuccessPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Modal styles */
.garage-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.garage-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.garage-modal-content {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: garageModalSlideIn 0.3s ease-out;
}

@keyframes garageModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.garage-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.garage-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.garage-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: color 0.2s ease;
}

.garage-modal-close:hover {
    color: #374151;
}

/* Garage list styles */
.garage-list {
    margin: 1rem 0;
}

.garage-item {
    display: block;
    width: 100%;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background-color: #f9fafb;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.garage-item:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.garage-item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.garage-item-info {
    flex: 1;
}

.garage-item-name {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.garage-item-details {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.garage-item-count {
    font-size: 0.75rem;
    color: #9ca3af;
}

.garage-item-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #3b82f6;
    color: white;
    border-radius: 9999px;
    margin-left: 0.5rem;
}

.garage-item-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #6b7280;
    flex-shrink: 0;
}

/* Empty state styles */
.garage-empty-state {
    text-align: center;
    padding: 2rem 1rem;
}

.garage-empty-icon {
    width: 3rem;
    height: 3rem;
    color: #9ca3af;
    margin: 0 auto 1rem;
}

.garage-empty-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.garage-empty-description {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Notification styles */
.garage-notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    max-width: 24rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.garage-notification.show {
    transform: translateX(0);
}

.garage-notification-success {
    background-color: #10b981;
    color: white;
}

.garage-notification-error {
    background-color: #ef4444;
    color: white;
}

.garage-notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.garage-notification-message {
    flex: 1;
    margin-right: 0.5rem;
}

.garage-notification-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.garage-notification-close:hover {
    opacity: 1;
}

/* Loading spinner */
.garage-loading-spinner {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
}

.garage-spinner-content {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.garage-spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: garageSpin 1s linear infinite;
    margin: 0 auto 0.5rem;
}

@keyframes garageSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.garage-spinner-text {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .garage-modal-content {
        width: 95%;
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .garage-btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .garage-notification {
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
    }
}

/* WooCommerce integration */
.woocommerce .garage-btn {
    margin-top: 0.5rem;
}

.woocommerce .product .garage-btn {
    margin-top: 1rem;
}

.woocommerce .products .garage-btn {
    margin-top: 0.5rem;
}

/* Theme compatibility */
.theme-twenty-twenty-one .garage-btn,
.theme-twenty-twenty-two .garage-btn,
.theme-twenty-twenty-three .garage-btn {
    font-family: inherit;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .garage-modal-content {
        background-color: #1f2937;
        color: #f9fafb;
    }
    
    .garage-item {
        background-color: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .garage-item:hover {
        background-color: #4b5563;
        border-color: #6b7280;
    }
    
    .garage-item-name {
        color: #f9fafb;
    }
    
    .garage-item-details {
        color: #d1d5db;
    }
    
    .garage-item-count {
        color: #9ca3af;
    }
    
    .garage-empty-title {
        color: #f9fafb;
    }
    
    .garage-empty-description {
        color: #d1d5db;
    }
} 