/* Comparison Feature Styles */

/* Circular Button Images (Header) */
.btn-circular {
    position: relative;
    overflow: hidden;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

.compare-vessel {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.compare-mini-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.compare-vessel.phones-1 .compare-mini-img {
    height: 75%;
    width: auto;
    max-width: 75%;
    object-fit: contain;
    border-radius: 0;
}

.compare-vessel.phones-2 .compare-mini-img {
    width: 45%;
    height: 75%;
    object-fit: contain;
    border-radius: 0;
    margin-left: -5%;
}

.compare-vessel.phones-3 .compare-mini-img,
.compare-vessel.phones-4 .compare-mini-img {
    width: 35%;
    height: 75%;
    object-fit: contain;
    border-radius: 0;
    margin-left: -15%;
}

.compare-vessel .compare-mini-img:first-child {
    margin-left: 0;
}

/* Plus Button on Cards */
.recent-phone-card, .modelo, .novedad-card {
    position: relative;
}

.btn-plus-compare {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: rgba(66, 93, 245, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 5;
    opacity: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.recent-phone-card:hover .btn-plus-compare, 
.modelo:hover .btn-plus-compare,
.novedad-card:hover .btn-plus-compare {
    opacity: 1;
}

.btn-plus-compare:hover {
    background: var(--brand-blue-dark);
    transform: scale(1.1);
}

.btn-plus-compare.selected {
    background: #4caf50;
}

/* Tooltip for the + button */
.btn-plus-compare::after {
    content: "Comparar";
    position: absolute;
    bottom: 100%;
    right: 50%;
    transform: translateX(50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-bottom: 5px;
}

.btn-plus-compare:hover::after {
    opacity: 1;
}

/* Compare Modal Overlay */
.compare-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 2000;
    display: block;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.compare-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.compare-modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 320px;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-10px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.3s ease;
    border: 1px solid #eef2f6;
}

.compare-modal-overlay.active .compare-modal-content {
    transform: translateY(0);
    opacity: 1;
}

.cm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cm-title {
    font-size: 16px;
    font-weight: 800;
    color: #1f2937;
    text-transform: uppercase;
}

.cm-close {
    background: transparent;
    border: none;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.cm-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

.cm-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.cm-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid #eef2f6;
}

.cm-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cm-item-img {
    width: 30px;
    height: 40px;
    object-fit: contain;
}

.cm-item-name {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.cm-remove-btn {
    background: transparent;
    color: #888;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.cm-remove-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

.cm-go-btn {
    width: 100%;
    padding: 15px 20px;
    background: #868e96;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
    text-decoration: none;
    display: block;
}

.cm-go-btn:hover {
    background: #737a82;
}

.cm-go-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
    pointer-events: none;
}
