/* SSR: Estilos para el fallback sin JavaScript del detalle de oferta */

/* Ocultar contenido SSR cuando Vue está activo */
.vue-active [data-ssr="offer-detail"] {
    display: none !important;
}

/* Contenido JS oculto por defecto, visible cuando Vue está activo */
.vue-app-content {
    display: none;
}

.vue-active .vue-app-content {
    display: block;
}

/* Layout de dos columnas para escritorio */
[data-ssr="offer-detail"] .ssr-detail-layout {
    display: grid;
    grid-template-columns: 1fr 317px;
    gap: 0;
    max-width: 100%;
}

@media (max-width: 768px) {
    [data-ssr="offer-detail"] .ssr-detail-layout {
        grid-template-columns: 1fr;
    }
    
    [data-ssr="offer-detail"] .ssr-detail-sidebar {
        display: none;
    }
}

[data-ssr="offer-detail"] .ssr-detail-main {
    min-width: 0;
}

[data-ssr="offer-detail"] .ssr-detail-sidebar {
    background-color: #391383;
    color: white;
    padding: 20px;
}

/* Sidebar content */
[data-ssr="offer-detail"] .ssr-sidebar-header {
    text-align: center;
    margin-bottom: 20px;
}

[data-ssr="offer-detail"] .ssr-sidebar-date {
    font-size: 0.875rem;
    margin-bottom: 8px;
}

[data-ssr="offer-detail"] .ssr-sidebar-date strong {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
}

[data-ssr="offer-detail"] .ssr-sidebar-time {
    font-size: 1.5rem;
    font-weight: 700;
}

[data-ssr="offer-detail"] .ssr-sidebar-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
    font-size: 0.875rem;
}

[data-ssr="offer-detail"] .ssr-sidebar-highlight {
    text-align: center;
    color: #FBB44C;
    font-size: 0.875rem;
    margin: 20px 0;
}

[data-ssr="offer-detail"] .ssr-sidebar-button {
    display: block;
    width: 100%;
    padding: 16px;
    background-color: #FBB44C;
    color: white;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 4px;
    text-decoration: none;
    margin-bottom: 20px;
}

[data-ssr="offer-detail"] .ssr-sidebar-price {
    text-align: center;
    margin-bottom: 20px;
}

[data-ssr="offer-detail"] .ssr-sidebar-price-label {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

[data-ssr="offer-detail"] .ssr-sidebar-price-value {
    font-size: 1.25rem;
    font-weight: 700;
}

[data-ssr="offer-detail"] .ssr-sidebar-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

[data-ssr="offer-detail"] .ssr-sidebar-badge {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-align: center;
}

/* Colores de fondo según estado (de Tailwind config) */
.bg-turquoise-500 {
    background-color: #00CACE;
}

.bg-yellow-500 {
    background-color: #FBB44C;
}

.bg-purple-500 {
    background-color: #391383;
}

/* Galería - patrón exacto del Swiper */
[data-ssr="offer-detail"] .ssr-gallery-container {
    position: relative;
    height: 362px;
    z-index: 1;
    overflow: hidden;
}

[data-ssr="offer-detail"] .ssr-gallery-wrapper {
    display: flex;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

[data-ssr="offer-detail"] .ssr-gallery-wrapper::-webkit-scrollbar {
    display: none;
}

[data-ssr="offer-detail"] .ssr-gallery-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

[data-ssr="offer-detail"] .ssr-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Paginación bullets - estilo Swiper */
[data-ssr="offer-detail"] .swiper-pagination {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 10;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
}

[data-ssr="offer-detail"] .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #C0C3CF;
    cursor: pointer;
    transition: all 0.3s ease;
}

[data-ssr="offer-detail"] .swiper-pagination-bullet-active,
[data-ssr="offer-detail"] .swiper-pagination-bullet-active-main {
    background-color: #210473;
    width: 16px;
    border-radius: 3px;
}

/* Thumbnails */
[data-ssr="offer-detail"] .swiper-container-thumbs {
    width: 100%;
    margin-top: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

[data-ssr="offer-detail"] .swiper-container-thumbs::-webkit-scrollbar {
    display: none;
}

[data-ssr="offer-detail"] .swiper-wrapper-thumbs {
    display: flex;
    flex-direction: row;
}

[data-ssr="offer-detail"] .swiper-slide-thumb {
    flex-shrink: 0;
    width: 105.5px;
    height: 98px;
    margin-right: 5px;
    cursor: pointer;
}

[data-ssr="offer-detail"] .swiper-slide-thumb:last-child {
    margin-right: 0;
}

[data-ssr="offer-detail"] .swiper-slide-thumb img {
    width: 106px;
    height: 98px;
    object-fit: cover;
    object-position: center;
    border-radius: 4px;
}

/* Acordeón details */
[data-ssr="offer-detail"] details {
    border-bottom: 1px solid #eee;
}

[data-ssr="offer-detail"] details[open] summary ~ * {
    animation: sweep .3s ease-in-out;
}

@keyframes sweep {
    0%    {opacity: 0; transform: translateY(-10px)}
    100%  {opacity: 1; transform: translateY(0)}
}

[data-ssr="offer-detail"] summary {
    list-style: none;
}

[data-ssr="offer-detail"] summary::-webkit-details-marker {
    display: none;
}

/* Complejidad del ofrecimiento */
[data-ssr="offer-detail"] .ssr-complexity-row {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 32px;
}

[data-ssr="offer-detail"] .ssr-complexity-label {
    font-size: 0.75rem;
    font-weight: 300;
    text-transform: uppercase;
    color: #674D97; /* purple-300 */
    font-family: 'Subastop', sans-serif;
}

[data-ssr="offer-detail"] .ssr-complexity-dots {
    display: flex;
    align-items: center;
    margin-left: 8px;
    gap: 4px;
}

[data-ssr="offer-detail"] .ssr-complexity-dot {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

[data-ssr="offer-detail"] .ssr-complexity-dot.easy {
    background-color: #08DE00; /* quality-200 */
}

[data-ssr="offer-detail"] .ssr-complexity-dot.medium {
    background-color: #FED41A; /* quality-400 */
}

[data-ssr="offer-detail"] .ssr-complexity-dot.expert {
    background-color: #D30000; /* quality-600 */
}

[data-ssr="offer-detail"] .ssr-complexity-dot.inactive {
    background-color: #9397AB; /* gray-500 */
}

/* Conditions typography */
[data-ssr="offer-detail"] .conditions-typography {
    font-family: 'Subastop', sans-serif;
}

[data-ssr="offer-detail"] .conditions-typography h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #210473; /* purple-700 */
    margin-top: 24px;
    margin-bottom: 12px;
}

[data-ssr="offer-detail"] .conditions-typography h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #4F308B; /* purple-400 */
    margin-top: 16px;
    margin-bottom: 8px;
}

[data-ssr="offer-detail"] .conditions-typography p {
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.625;
    color: #210473; /* purple-700 */
    margin-bottom: 12px;
}

[data-ssr="offer-detail"] .conditions-typography ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 12px;
}

[data-ssr="offer-detail"] .conditions-typography li {
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.625;
    color: #210473; /* purple-700 */
    margin-bottom: 4px;
}

[data-ssr="offer-detail"] .conditions-typography a {
    color: #FF785F; /* coral-500 */
    text-decoration: underline;
}

[data-ssr="offer-detail"] .conditions-typography strong {
    font-weight: 700;
}

/* Badges  */
[data-ssr="offer-detail"] .badge-financiable {
    background-color: #FF785F; /* coral-500 */
}

[data-ssr="offer-detail"] .badge-financiable svg {
    color: #FF785F; /* coral-500 */
}

[data-ssr="offer-detail"] .badge-virtual {
    background-color: #28CC19; /* green-300 */
}

/* Colores de texto  */
[data-ssr="offer-detail"] .text-primary {
    color: #4F308B; /* purple-400 */
}

[data-ssr="offer-detail"] .text-secondary {
    color: #70758A; /* gray-700 */
}

[data-ssr="offer-detail"] .text-accent {
    color: #FF785F; /* coral-500 */
}

[data-ssr="offer-detail"] .text-muted {
    color: #9397AB; /* gray-500 */
}

/* Bordes  */
[data-ssr="offer-detail"] .border-primary {
    border-color: #4F308B; /* purple-400 */
}

[data-ssr="offer-detail"] .border-light {
    border-color: #D8DBE3; /* gray-200 */
}

/* Documentos */
[data-ssr="offer-detail"] a {
    transition: background-color 0.2s ease;
    text-decoration: none;
}

[data-ssr="offer-detail"] a:hover {
    background-color: #f5f5f5;
}

/* Links sin subrayado */
[data-ssr="offer-detail"] .no-underline {
    text-decoration: none;
}

/* Whitespace pre-line para descripciones */
[data-ssr="offer-detail"] .whitespace-pre-line {
    white-space: pre-line;
}

/* Indicadores de calidad  */
[data-ssr="offer-detail"] .quality-good {
    background-color: #08DE00; /* quality-200 */
}

[data-ssr="offer-detail"] .quality-medium {
    background-color: #C0C3CF; /* gray-300 */
}

/* Header de sección  */
[data-ssr="offer-detail"] .ssr-section-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    cursor: pointer;
}

[data-ssr="offer-detail"] .ssr-section-title-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 8px 24px;
}

[data-ssr="offer-detail"] .ssr-section-title {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.25;
    color: #210473; /* purple-700 */
    font-family: 'Subastop', sans-serif;
    text-align: center;
}

[data-ssr="offer-detail"] .ssr-corner-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    color: #FF785F; /* coral-500 */
}

[data-ssr="offer-detail"] .ssr-corner-right {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    color: #FF785F; /* coral-500 */
}

[data-ssr="offer-detail"] .ssr-chevron {
    position: absolute;
    right: 0;
    width: 24px;
    height: 24px;
    margin-right: 32px;
    color: #A298B3; /* purple-100 */
    transition: transform 0.2s ease;
}

[data-ssr="offer-detail"] details[open] .ssr-chevron {
    transform: rotate(180deg);
}

/* Lista de atributos  */
[data-ssr="offer-detail"] .ssr-attributes-list {
    width: 100%;
    margin-top: 16px;
    border-top: 1px solid #D8DBE3; /* gray-200 */
}

[data-ssr="offer-detail"] .ssr-attribute-item {
    display: flex;
    align-items: flex-start;
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid #D8DBE3; /* gray-200 */
    gap: 16px;
}

[data-ssr="offer-detail"] .ssr-attribute-label {
    flex-shrink: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: #210473; /* purple-700 */
    font-family: 'Subastop', sans-serif;
}

[data-ssr="offer-detail"] .ssr-attribute-value {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 300;
    text-align: right;
    color: #210473; /* purple-700 */
    font-family: 'Subastop', sans-serif;
}

/* Calidad de información  */
[data-ssr="offer-detail"] .ssr-quality-row {
    display: flex;
    align-items: center;
}

[data-ssr="offer-detail"] .ssr-quality-dots {
    display: flex;
    align-items: center;
    margin-left: 8px;
    gap: 4px;
}

[data-ssr="offer-detail"] .ssr-quality-label {
    font-size: 0.75rem;
    font-weight: 300;
    text-transform: uppercase;
    color: #674D97; /* purple-300 */
    font-family: 'Subastop', sans-serif;
}

[data-ssr="offer-detail"] .ssr-quality-dot {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

[data-ssr="offer-detail"] .ssr-quality-dot.good {
    background-color: #08DE00; /* quality-200 */
}

[data-ssr="offer-detail"] .ssr-quality-dot.medium {
    background-color: #9397AB; /* gray-500 */
}

[data-ssr="offer-detail"] .ssr-offer-code {
    font-size: 0.75rem;
    font-weight: 300;
    text-transform: uppercase;
    color: #9397AB; /* gray-500 */
    font-family: 'Subastop', sans-serif;
}

/* Descripción  */
[data-ssr="offer-detail"] .ssr-description {
    margin-top: 32px;
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.625;
    color: #210473; /* purple-700 */
    word-break: break-word;
    font-family: 'Subastop', sans-serif;
}

[data-ssr="offer-detail"] .ssr-footer-note {
    margin-top: 24px;
    font-size: 0.75rem;
    line-height: 1.625;
    text-align: center;
    color: #210473; /* purple-700 */
    font-family: 'Subastop', sans-serif;
}

[data-ssr="offer-detail"] .ssr-footer-note .asterisk {
    color: #ed8936; /* orange-500 */
}

/* Sección de documentos  */
[data-ssr="offer-detail"] .ssr-documents-section {
    margin-top: 32px;
}

[data-ssr="offer-detail"] .ssr-documents-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #210473; /* purple-700 */
    font-family: 'Subastop', sans-serif;
}

[data-ssr="offer-detail"] .ssr-documents-list {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

[data-ssr="offer-detail"] .ssr-document-card {
    display: grid;
    grid-template-columns: 1fr 80px;
    gap: 12px;
    padding: 12px;
    border: 1px solid #4F308B; /* purple-400 */
    border-right-width: 8px;
    border-radius: 8px;
    text-decoration: none;
    color: #4F308B;
    transition: all 0.2s ease;
    min-height: 64px;
}

[data-ssr="offer-detail"] .ssr-document-card:hover {
    background-color: #4F308B;
    color: white;
    border-color: #4F308B;
}

[data-ssr="offer-detail"] .ssr-document-card:hover .ssr-document-icon,
[data-ssr="offer-detail"] .ssr-document-card:hover .ssr-document-title,
[data-ssr="offer-detail"] .ssr-document-card:hover .ssr-download-icon,
[data-ssr="offer-detail"] .ssr-document-card:hover .ssr-download-text {
    color: white;
}

[data-ssr="offer-detail"] .ssr-document-info {
    display: flex;
    align-items: center;
    gap: 8px;
    border-right: 1px solid #4F308B;
    padding-right: 12px;
    }

[data-ssr="offer-detail"] .ssr-document-card:hover .ssr-document-info {
    border-right-color: white;
}

[data-ssr="offer-detail"] .ssr-document-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #4F308B;
    transition: color 0.2s ease;
}

[data-ssr="offer-detail"] .ssr-document-title {
    font-size: 0.75rem;
    line-height: 1.25;
    font-family: 'Subastop', sans-serif;
    color: #4F308B;
    transition: color 0.2s ease;
}

[data-ssr="offer-detail"] .ssr-download-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

[data-ssr="offer-detail"] .ssr-download-icon {
    width: 20px;
    height: 20px;
    color: #4F308B;
    transition: color 0.2s ease;
}

[data-ssr="offer-detail"] .ssr-download-text {
    font-size: 0.75rem;
    line-height: 1.25;
    text-align: center;
    font-family: 'Subastop', sans-serif;
    color: #4F308B;
    transition: color 0.2s ease;
}
