/* Frontend styles for portfolio attributes */

.tbpa-wrapper {
    margin: 30px auto;  
    max-width: var(--site_width); 
    padding: 30px;
    background: var(--awb-color3);
    border-radius: 6px;
}

.tbpa-wrapper h3 {
    margin-top: 0;
    border-bottom: 2px solid #00a8e3;
    padding-bottom: 10px;
}

.tbpa-attribute-wrapper {
    padding: 9px 0 6px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
    align-items: start;
    border-bottom: 1px dotted #cad1d6;
}

.tbpa-attribute-wrapper:last-child {
    margin-bottom: 0;
}

.tbpa-attribute-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    color: #444;
    width: 240px;
}

.tbpa-attribute-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Larger gap for visual type terms */
.tbpa-term-type-swatch .tbpa-attribute-terms,
.tbpa-term-type-image .tbpa-attribute-terms {
    gap: 20px;
    align-items: flex-start;
}

.tbpa-term-value {
    display: inline-block;
    padding: 4px 12px;
    background: #fff;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
    transition: all 0.2s ease;
}

.tbpa-term-value:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

/* List type terms */
.tbpa-term-type-list .tbpa-term-value {
    background: #fff;

}

/* Visual type terms (swatch and image) */
.tbpa-term-visual {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    background: transparent;
    border: none;
    width: 120px;
    text-align: center;
}

.tbpa-term-visual:hover {
    background: transparent;
}

.tbpa-term-visual-element {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.2s ease;
}

.tbpa-term-type-swatch .tbpa-term-visual-element {
    margin-bottom: 10px;
}

.tbpa-term-visual:hover .tbpa-term-visual-element {
    transform: scale(1.05);
}

/* Swatch type specific */
.tbpa-term-type-swatch .tbpa-term-visual-element {
    background-color: #f0f0f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Image type specific */
.tbpa-term-type-image .tbpa-term-visual {
    width: 110px;
}

.tbpa-term-type-image .tbpa-term-visual-element {
    width: 70px;
    height: 70px;
    border-radius: 8px;
}

.tbpa-term-type-image .tbpa-term-label {
    max-width: 110px;
}

/* Visual term labels */
.tbpa-term-label {
    font-size: 14px;
    line-height: 1.4;
    color: #555;
    max-width: 120px;
    word-wrap: break-word;
}

.tbpa-term-visual:hover .tbpa-term-label {
    color: #000;
}

/* Responsive design */
@media (max-width: 768px) {
    .tbpa-wrapper {
        padding: 15px;
    }
    
    .tbpa-attribute-terms {
        gap: 6px;
    }
    
    .tbpa-term-value {
        padding: 4px 8px;
        font-size: 13px;
    }
    
    /* Visual terms on mobile */
    .tbpa-term-visual {
        width: 80px;
    }
    
    .tbpa-term-visual-element {
        width: 80px;
        height: 80px;
        margin-bottom: 8px;
    }
    
    .tbpa-term-label {
        font-size: 13px;
        max-width: 80px;
    }
    
    /* Image terms on mobile - smaller */
    .tbpa-term-type-image .tbpa-term-visual {
        width: 60px;
    }
    
    .tbpa-term-type-image .tbpa-term-visual-element {
        width: 60px;
        height: 60px;
    }
    
    .tbpa-term-type-image .tbpa-term-label {
        max-width: 60px;
    }
}


/* Link styles for list terms */
.tbpa-term-type-list a span::after { 
    content: '\f0c1'; 
    color: #00a8e3; 
    margin-left: 7px; 
    font-size: 85%; 
    font-family: "Font Awesome 5 Free"; 
    font-weight: 900; 
    transition: all ease 0.35s; 
}
.tbpa-term-type-list a:hover span { 
    color: #00a8e3!important; 
}

/* Link styles for visual terms */
.tbpa-attribute-terms a {
    text-decoration: none;
}

.tbpa-attribute-terms a .tbpa-term-visual {
    cursor: pointer;
}

/* Visual term link indicator */
.tbpa-attribute-terms a .tbpa-term-label::after {
    content: '\f0c1';
    color: #00a8e3;
    margin-left: 5px;
    font-size: 12px;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tbpa-attribute-terms a:hover .tbpa-term-label::after {
    opacity: 1;
}

/* Mobile Steez */ 
@media (max-width: 660px) {
    .tbpa-attribute-wrapper { display: block; padding-bottom: 14px; }
    .tbpa-attribute-name { width: 100%; }
}