/* Full Claro Styles - Enhanced with Fluent Design */

/* Line clamp utility */
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* List transitions */
.list-enter-active,
.list-leave-active {
    transition: all 0.3s ease;
}

.list-enter-from {
    opacity: 0;
    transform: translateX(-30px);
}

.list-leave-to {
    opacity: 0;
    transform: translateX(30px);
}

.list-move {
    transition: transform 0.3s ease;
}



/* Full Claro badge */
.full-claro-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #E20613 0%, #ff0721 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: bold;
    font-size: 0.875rem;
    box-shadow: 0 4px 6px -1px rgba(226, 6, 19, 0.3);
    animation: pulse 2s infinite;
}

/* Price display */
.price-display {
    position: relative;
}

.price-main {
    font-size: 2rem;
    font-weight: bold;
    color: #E20613;
    line-height: 1;
}

.price-original {
    font-size: 1rem;
    color: #6b7280;
    text-decoration: line-through;
    opacity: 0.7;
}

.price-period {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Discount tag */
.discount-tag {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: linear-gradient(135deg, #E20613 0%, #ff5fa2 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 2px 4px -1px rgba(226, 6, 19, 0.25);
}



/* Timeline */
.price-timeline {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* New Timeline Components */
.timeline-container {
    display: flex;
    position: relative;
}

.timeline-months {
    width: 40px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-month-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    line-height: 1.2;
    height: 60px;
    margin-bottom: 1rem;
}

.timeline-content {
    flex: 1;
    position: relative;
}

.timeline-line {
    position: absolute;
    left: 12px;
    top: 30px;
    bottom: 30px;
    width: 2px;
    background: #E20613;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.25rem;
    min-height: 60px;
    display: flex;
    align-items: flex-start;
}

.timeline-dot {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background: #ffffff;
    border: 2px solid;
    z-index: 10;
}

.timeline-dot.start,
.timeline-dot.period {
    border-color: #E20613;
    background: #E20613;
}

.timeline-dot.end {
    border-color: #e41e26;
    background: #e41e26;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-dot.end svg {
    width: 8px;
    height: 8px;
    color: white;
}

.timeline-content-item {
    margin-left: 2.1rem;
    flex: 1;
}

.timeline-period-info {
    background: #ffffff;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #E20613;
    border-radius: 4px;
}

.timeline-period-info.final {
    border-left-color: #ff5fa2;
}

/* Timeline responsive adjustments */
@media (max-width: 640px) {
    .timeline-months {
        width: 40px;
    }
    .timeline-month-label {
        height: 48px;
        font-size: 0.7rem;
    }
    .timeline-dot {
        left: 4px;
        top: 50%;
        transform: translateY(-50%);
        width: 14px;
        height: 14px;
    }
    .timeline-content {
        padding-left: 1rem;
    }
    .timeline-content-item {
        margin-left: 1.9rem;
    }
    /* Alinear línea con el centro del dot móvil (4px + 7px) */
    .timeline-line {
        left: 11px;
    }
}

/* Action buttons */
.action-button {
    width: 100%;
    padding: 0.75rem;
    @apply rounded-md;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.action-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.action-button:hover::before {
    width: 300px;
    height: 300px;
}

.action-button.primary {
    background: linear-gradient(135deg, #E20613 0%, #ff0721 100%);
    color: white;
    @apply shadow-md;
}

.action-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(226, 6, 19, 0.3);
}

.action-button.secondary {
    background: #f3f4f6;
    color: #374151;
}

.action-button.secondary:hover {
    background: #e5e7eb;
}

/* Loading state */
.loading-spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #E20613;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
}

.empty-state-icon {
    width: 6rem;
    height: 6rem;
    margin: 0 auto 1rem;
    color: #d1d5db;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .price-main {
        font-size: 1.5rem;
    }
}

/* Desktop widening for timeline sidebar */
@media (min-width: 1024px) {
    .timeline-months {
        width: 40px;
    }
    .timeline-month-label {
        height: 70px;
    }
}

/* Fluent Design Enhancements */

/* Card hover effects with depth */
.card-fluent {
    @apply relative bg-white rounded-xl border border-gray-200 shadow-sm transition-all duration-200;
}

.card-fluent:hover {
    @apply shadow-lg border-claro-red/50 -translate-y-1;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Backdrop blur effect */
.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

/* Improved badge styles */
.badge-popular {
    @apply absolute -top-2 -right-2 bg-gradient-to-r from-claro-red to-red-600 text-white text-xs font-bold px-3 py-1 rounded-full shadow-lg z-10;
}

/* Icon containers */
.icon-container {
    @apply flex items-center justify-center w-12 h-12 rounded-lg transition-all duration-200;
}

.icon-container-primary {
    @apply bg-gradient-to-br from-claro-red/10 to-red-600/10;
}

.icon-container-primary:hover {
    @apply from-claro-red/20 to-red-600/20;
}

/* Price display improvements */
.price-card {
    @apply bg-gray-50 rounded-lg p-4;
}

.price-value {
    @apply text-2xl font-bold text-claro-red;
}

.price-original {
    @apply text-xs text-gray-500 line-through;
}

/* Button enhancements */
.button-primary {
    @apply bg-gradient-to-r from-claro-red to-red-600 text-white hover:from-red-600 hover:to-red-700 shadow-md hover:shadow-lg transition-all duration-200;
}

.button-secondary {
    @apply bg-blue-600 text-white hover:bg-blue-700 shadow-md hover:shadow-lg transition-all duration-200;
}

/* Responsive improvements for better visibility */
@media (min-width: 768px) {
    .grid-enhanced {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .grid-enhanced {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Enhanced visual hierarchy */
.visually-enhanced {
    @apply border border-gray-200 bg-white shadow-sm;
}

.visually-enhanced:hover {
    @apply border-claro-red/50 shadow-lg -translate-y-0.5;
    box-shadow: 0 25px 50px -12px rgba(226, 6, 19, 0.25);
}

/* Ultra-compact card interactions */
.card-compact {
    @apply bg-white border rounded-lg transition-all cursor-pointer relative;
}

.card-compact:hover {
    @apply border-claro-red shadow-sm;
    transform: translateY(-1px);
}

.card-compact.selected {
    @apply border-blue-500 bg-blue-50 ring-1 ring-blue-200;
}

/* Minimal badges */
.badge-popular-compact {
    @apply absolute -top-0.5 -right-0.5 bg-claro-red text-white rounded-full;
    font-size: 8px;
    padding: 1px 4px;
    line-height: 1;
}

/* Compact text truncation */
.text-truncate-compact {
    @apply truncate;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Minimal grid layouts */
.grid-ultra-compact {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

@media (min-width: 640px) {
    .grid-ultra-compact {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (min-width: 768px) {
    .grid-ultra-compact {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (min-width: 1024px) {
    .grid-ultra-compact {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (min-width: 1280px) {
    .grid-ultra-compact {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Click feedback */
.click-feedback {
    position: relative;
    overflow: hidden;
}

.click-feedback:active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(226, 6, 19, 0.1);
    animation: ripple 0.3s ease-out;
}

@keyframes ripple {
    from {
        transform: scale(0);
        opacity: 1;
    }
    to {
        transform: scale(2);
        opacity: 0;
    }
}
