/**
 * Software Manager - Software Card Component (Scoped)
 * Replaces the software card styles from front-end-software.css with proper scoping
 */

/* Software Card Base Styles */
.sm-plugin-wrapper .sm-software-card {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 3px solid var(--sm-primary-color, #1A172C);
    border-radius: 70px;
    padding: 30px;
    margin: 15px 0;
    width: 100%;
    max-width: 100%;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* Logo Container */
.sm-plugin-wrapper .sm-software-card__logo-container,
.sm-plugin-wrapper .sm-software-card .sm-logo-container {
    flex: 0 0 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 25px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f8f8;
    transition: all 0.3s ease;
    border: 1px solid var(--sm-border-color, #e0e6ed);
    position: relative;
}

.sm-plugin-wrapper .sm-software-card__logo,
.sm-plugin-wrapper .sm-software-card .sm-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    position: relative;
}

/* Software Info Container */
.sm-plugin-wrapper .sm-software-card__info,
.sm-plugin-wrapper .sm-software-card .sm-info-container {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    padding-right: 20px;
}

/* Software Name */
.sm-plugin-wrapper .sm-software-card__name,
.sm-plugin-wrapper .sm-software-card .sm-software-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--sm-text-color, #222222);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: color 0.3s ease;
    line-height: 1.3;
}

/* Rating Container */
.sm-plugin-wrapper .sm-software-card__rating,
.sm-plugin-wrapper .sm-software-card .sm-card-rating-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
    flex-wrap: wrap;
}

/* Rating Value */
.sm-plugin-wrapper .sm-software-card__rating-value,
.sm-plugin-wrapper .sm-software-card .sm-card-rating-value {
    font-size: clamp(16px, 1.8vw, 18px);
    font-weight: 700;
    color: var(--sm-text-color, #444444);
    position: relative;
    padding-right: 1.5rem;
    display: flex;
    align-items: center;
}

.sm-plugin-wrapper .sm-software-card__rating-value::after,
.sm-plugin-wrapper .sm-software-card .sm-card-rating-value::after {
    content: '/ 5';
    font-size: 0.75em;
    color: #666666;
    font-weight: 500;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* Star Rating Styles */
.sm-plugin-wrapper .sm-software-card__stars,
.sm-plugin-wrapper .sm-software-card .sm-card-stars {
    position: relative;
    display: inline-block;
    width: 100px;
    height: 20px;
    background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23ddd" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpolygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/%3E%3C/svg%3E');
    background-size: 20px 20px;
    background-repeat: repeat-x;
    vertical-align: middle;
    z-index: 1;
    min-width: 100px;
    flex-shrink: 0;
}

.sm-plugin-wrapper .sm-software-card__stars-inner,
.sm-plugin-wrapper .sm-software-card .sm-card-stars-inner {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="%23ffc107" stroke="%23ffc107" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpolygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/%3E%3C/svg%3E');
    background-size: 20px 20px;
    background-repeat: repeat-x;
    overflow: hidden;
    z-index: 2;
}

/* Button Container */
.sm-plugin-wrapper .sm-software-card__buttons,
.sm-plugin-wrapper .sm-software-card .sm-button-container {
    flex: 0 0 auto;
    margin-left: auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* Buttons */
.sm-plugin-wrapper .sm-software-card__button,
.sm-plugin-wrapper .sm-software-card .sm-visit-button,
.sm-plugin-wrapper .sm-software-card .sm-review-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border: 2px solid var(--sm-primary-color, #1A172C);
    border-radius: 50px;
    background-color: var(--sm-primary-color, #1A172C);
    color: #ffffff;
    font-family: inherit;
    font-size: clamp(11px, 1.2vw, 12px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    height: 48px;
    box-sizing: border-box;
    word-break: keep-all;
    box-shadow: 0 2px 8px rgba(26, 23, 44, 0.15);
}

.sm-plugin-wrapper .sm-software-card__button:hover,
.sm-plugin-wrapper .sm-software-card .sm-visit-button:hover,
.sm-plugin-wrapper .sm-software-card .sm-review-btn:hover {
    background-color: var(--sm-secondary-color, #362e62);
    border-color: var(--sm-secondary-color, #362e62);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 23, 44, 0.25);
}

/* Hidden Software State */
.sm-plugin-wrapper .sm-software-card--hidden,
.sm-plugin-wrapper .sm-software-card.sm-hidden-software {
    opacity: 0.95;
    position: relative;
}

.sm-plugin-wrapper .sm-software-card__hidden-notice,
.sm-plugin-wrapper .sm-software-card .sm-hidden-notice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    background-color: rgba(248, 250, 252, 0.8);
    color: #64748b;
    font-family: inherit;
    font-size: clamp(11px, 1.2vw, 12px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 140px;
    height: 48px;
    box-sizing: border-box;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    position: relative;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    .sm-plugin-wrapper .sm-software-card {
        border-radius: 25px;
        padding: 20px 15px;
        margin: 10px 0;
        flex-direction: column;
        align-items: center;
        text-align: center;
        min-height: auto;
    }
    
    .sm-plugin-wrapper .sm-software-card__logo-container,
    .sm-plugin-wrapper .sm-software-card .sm-logo-container {
        flex: 0 0 60px;
        height: 60px;
        width: 60px;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .sm-plugin-wrapper .sm-software-card__info,
    .sm-plugin-wrapper .sm-software-card .sm-info-container {
        flex: 1;
        padding-right: 0;
        width: 100%;
        margin-bottom: 15px;
    }
    
    .sm-plugin-wrapper .sm-software-card__name,
    .sm-plugin-wrapper .sm-software-card .sm-software-name {
        font-size: 16px;
        margin-bottom: 10px;
        text-align: center;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
    
    .sm-plugin-wrapper .sm-software-card__rating,
    .sm-plugin-wrapper .sm-software-card .sm-card-rating-container {
        justify-content: center;
        align-items: center;
        margin: 10px 0;
    }
    
    .sm-plugin-wrapper .sm-software-card__rating-value,
    .sm-plugin-wrapper .sm-software-card .sm-card-rating-value {
        font-size: 18px;
        margin-right: 10px;
    }
    
    .sm-plugin-wrapper .sm-software-card__stars,
    .sm-plugin-wrapper .sm-software-card .sm-card-stars {
        width: 90px;
        height: 18px;
        background-size: 18px 18px;
        flex-shrink: 0;
    }
    
    .sm-plugin-wrapper .sm-software-card__stars-inner,
    .sm-plugin-wrapper .sm-software-card .sm-card-stars-inner {
        background-size: 18px 18px;
    }
    
    .sm-plugin-wrapper .sm-software-card__buttons,
    .sm-plugin-wrapper .sm-software-card .sm-button-container {
        flex-direction: column;
        width: 100%;
        gap: 10px;
        margin-left: 0;
    }
    
    .sm-plugin-wrapper .sm-software-card__button,
    .sm-plugin-wrapper .sm-software-card .sm-visit-button,
    .sm-plugin-wrapper .sm-software-card .sm-review-btn {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        padding: 15px 20px;
        font-size: 14px;
        border-radius: 25px;
        height: 50px;
    }
}

/* Focus states for accessibility */
.sm-plugin-wrapper .sm-software-card:focus-within {
    outline: 3px solid var(--sm-link-color, #2271b1);
    outline-offset: 2px;
}

.sm-plugin-wrapper .sm-software-card__button:focus,
.sm-plugin-wrapper .sm-software-card .sm-visit-button:focus,
.sm-plugin-wrapper .sm-software-card .sm-review-btn:focus {
    outline: 3px solid var(--sm-link-color, #2271b1);
    outline-offset: 2px;
}