/**
 * Multi-Layer Icon Box Widget Styles
 */

/* Main Container */
.mlb-widget-container {
    position: relative;
    width: 100%;
}

/* Navigation Header */
.mlb-navigation-header {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.mlb-back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #6EC1E4;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mlb-back-button:hover {
    background: #5aafce;
    transform: translateX(-3px);
}

.mlb-back-button i {
    font-size: 12px;
}

.mlb-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #666;
}

.mlb-breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mlb-breadcrumb-separator {
    color: #999;
}

/* Icon Boxes Grid */
.mlb-icon-boxes-wrapper {
    position: relative;
    min-height: 200px;
}

.mlb-icon-boxes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    transition: opacity 0.3s ease;
}

.mlb-icon-boxes-grid.mlb-loading {
    opacity: 0.3;
    pointer-events: none;
}

/* Individual Icon Box */
.mlb-icon-box {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mlb-icon-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(110, 193, 228, 0.1) 0%, rgba(110, 193, 228, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mlb-icon-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: #6EC1E4;
}

.mlb-icon-box:hover::before {
    opacity: 1;
}

.mlb-icon-box[data-link-type="none"] {
    cursor: default;
}

.mlb-icon-box[data-link-type="none"]:hover {
    transform: none;
    box-shadow: none;
}

/* Icon/Image Wrapper */
.mlb-icon-box__icon-wrapper {
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.mlb-icon-box__icon {
    font-size: 60px;
    color: #6EC1E4;
    line-height: 1;
    transition: all 0.3s ease;
}

.mlb-icon-box:hover .mlb-icon-box__icon {
    transform: scale(1.1);
}

.mlb-icon-box__icon svg {
    width: 1em;
    height: 1em;
}

.mlb-icon-box__image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    transition: all 0.3s ease;
}

.mlb-icon-box:hover .mlb-icon-box__image {
    transform: scale(1.1);
}

/* Title */
.mlb-icon-box__title {
    font-size: 20px;
    font-weight: 600;
    color: #333333;
    margin: 0 0 10px 0;
    line-height: 1.4;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.mlb-icon-box:hover .mlb-icon-box__title {
    color: #6EC1E4;
}

/* Description */
.mlb-icon-box__description {
    font-size: 14px;
    color: #666666;
    margin: 0;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Loader Overlay */
.mlb-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 8px;
    backdrop-filter: blur(4px);
}

/* CSS Spinner Loader */
.mlb-loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #6EC1E4;
    border-radius: 50%;
    animation: mlb-spin 1s linear infinite;
}

@keyframes mlb-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Image Loader */
.mlb-loader-image {
    max-width: 100%;
    max-height: 100%;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .mlb-icon-boxes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mlb-icon-boxes-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .mlb-icon-box {
        padding: 25px 15px;
    }

    .mlb-navigation-header {
        padding: 12px;
    }

    .mlb-back-button {
        font-size: 13px;
        padding: 6px 12px;
    }

    .mlb-breadcrumb {
        font-size: 13px;
    }
}

/* Animation Classes */
.mlb-fade-in {
    animation: mlb-fade-in 0.4s ease;
}

@keyframes mlb-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mlb-fade-out {
    animation: mlb-fade-out 0.3s ease;
}

@keyframes mlb-fade-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Empty State */
.mlb-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.mlb-empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
    opacity: 0.5;
}

.mlb-empty-state p {
    font-size: 16px;
    margin: 0;
}
