/* Building Skin Packages Styles */

/* Skin packages view */
.building-options.bskin-packages-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

/* Skin package option */
.bskin-package-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    min-height: 120px;
}

.bskin-package-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.bskin-package-option.owned {
    border-color: rgba(0, 200, 255, 0.4);
    background: rgba(0, 200, 255, 0.05);
}

.bskin-package-option.active {
    border-color: rgba(0, 255, 100, 0.6);
    background: rgba(0, 255, 100, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 100, 0.3);
}

/* Package icon */
.bskin-package-icon {
    font-size: 48px;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Package name */
.bskin-name {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Package description */
.bskin-package-description {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin: 8px 0;
    line-height: 1.3;
}

/* Skin count */
.bskin-package-skin-count {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin: 5px 0;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

/* Package status */
.bskin-package-status {
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.bskin-status-active {
    color: #00ff64;
    font-weight: bold;
    font-size: 13px;
}

.bskin-package-price {
    font-size: 14px;
    font-weight: bold;
    color: #00d4ff;
    display: flex;
    align-items: center;
    gap: 5px;
}

.bskin-package-price.insufficient {
    color: #ff4444;
    opacity: 0.7;
}

/* Package actions */
.bskin-package-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    width: 100%;
}

.bskin-package-actions button {
    flex: 1;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bskin-preview-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bskin-preview-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.bskin-purchase-btn {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Primary variant for preview */
.bskin-purchase-btn.primary {
    padding: 12px 30px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 8px;
    min-width: 200px;
}

.bskin-purchase-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #00e5ff, #00aadd);
    transform: scale(1.05);
}

.bskin-purchase-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.activate-btn {
    background: linear-gradient(135deg, #00ff64, #00cc50);
    color: white;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 255, 100, 0.2),
                0 2px 4px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    font-size: 15px;
    padding: 10px 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.activate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.5s ease;
}

.activate-btn:hover {
    background: linear-gradient(135deg, #00ff74, #00dd60);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 12px rgba(0, 255, 100, 0.3),
                0 4px 8px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.activate-btn:hover::before {
    left: 100%;
}

.activate-btn:active {
    transform: translateY(0) scale(1);
    box-shadow: 0 2px 4px rgba(0, 255, 100, 0.2),
                0 1px 2px rgba(0, 0, 0, 0.1),
                inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.deactivate-btn {
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    color: white;
    border: none;
    box-shadow: 0 4px 6px rgba(255, 71, 87, 0.2),
                0 2px 4px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    font-size: 15px;
    padding: 10px 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.deactivate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.5s ease;
}

.deactivate-btn:hover {
    background: linear-gradient(135deg, #ff8787, #ff6b7a);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 12px rgba(255, 71, 87, 0.3),
                0 4px 8px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.deactivate-btn:hover::before {
    left: 100%;
}

.deactivate-btn:active {
    transform: translateY(0) scale(1);
    box-shadow: 0 2px 4px rgba(255, 71, 87, 0.2),
                0 1px 2px rgba(0, 0, 0, 0.1),
                inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Preview view - Vertical layout */
.building-options.bskin-preview-view {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bskin-preview-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.bskin-preview-header h3 {
    margin: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.95);
}

.bskin-back-to-packages {
    position: absolute;
    left: 0;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bskin-back-to-packages:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Preview content - Centered vertical layout */
.bskin-preview-content {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.bskin-preview-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

/* Skins list */
.bskin-preview-skins h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.bskin-skins-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.bskin-skin-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
}

.bskin-skin-comparison {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bskin-skin-comparison .original,
.bskin-skin-comparison .skinned {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.bskin-skin-comparison img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 4px;
    padding: 5px;
}

.bskin-skin-comparison span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

.bskin-skin-comparison .arrow {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.4);
}

/* Preview actions */
.bskin-preview-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.bskin-preview-actions .status-message {
    font-size: 14px;
    color: #00ff64;
    font-weight: bold;
}

.bskin-preview-actions .price-info {
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.9);
}

.bskin-preview-actions button.primary {
    padding: 12px 30px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 8px;
    min-width: 200px;
}

/* Help text */
.bskin-packages-help {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
}

/* Image Modal */
.skin-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skin-image-modal.active {
    opacity: 1;
}

.skin-image-modal.closing {
    opacity: 0;
}

.skin-image-modal-content {
    background: rgba(20, 20, 30, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.skin-image-modal.active .skin-image-modal-content {
    transform: scale(1);
}

.skin-image-modal-content h3 {
    margin: 0 0 15px 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 20px;
}

.skin-image-modal-content img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

.skin-image-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.skin-image-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Custom Confirm Dialog */
.custom-confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-confirm-dialog.active {
    opacity: 1;
}

.custom-confirm-dialog.closing {
    opacity: 0;
}

.confirm-dialog-content {
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.98), rgba(20, 20, 40, 0.98));
    border: 2px solid rgba(0, 200, 255, 0.3);
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.custom-confirm-dialog.active .confirm-dialog-content {
    transform: scale(1);
}

.confirm-dialog-content h3 {
    margin: 0 0 15px 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 20px;
    text-align: center;
}

.confirm-dialog-content p {
    margin: 0 0 25px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    text-align: center;
    line-height: 1.4;
}

.confirm-dialog-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-dialog-close:hover {
    background: rgba(255, 100, 100, 0.2);
    border-color: rgba(255, 100, 100, 0.4);
    color: white;
}

.confirm-dialog-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.confirm-dialog-buttons button {
    padding: 10px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.confirm-btn-yes {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: white;
}

.confirm-btn-yes:hover {
    background: linear-gradient(135deg, #00e5ff, #00aadd);
    transform: scale(1.05);
}

.confirm-btn-no {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.confirm-btn-no:hover {
    background: rgba(255, 100, 100, 0.2);
    border-color: rgba(255, 100, 100, 0.4);
}

/* Clickable skin images */
.bskin-skin-comparison .skinned.clickable:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

.bskin-skin-comparison .skinned.clickable img {
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.bskin-skin-comparison .skinned.clickable:hover img {
    border-color: rgba(0, 200, 255, 0.5);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .building-options.bskin-packages-view {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
        padding: 15px;
    }
    
    .bskin-package-option {
        padding: 10px;
    }
    
    .bskin-package-icon {
        font-size: 36px;
    }
    
    .bskin-skins-list {
        grid-template-columns: 1fr;
    }
    
    .bskin-skin-comparison img {
        width: 75px;
        height: 75px;
    }
}

/* Individual skin toggle controls */
.skin-toggle-control {
    margin-top: 10px;
    text-align: center;
}

.skin-toggle-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.skin-toggle-btn.active {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.skin-toggle-btn.active:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: scale(1.05);
}

.skin-toggle-btn.deactivated {
    background: linear-gradient(135deg, #f44336, #da190b);
    color: white;
}

.skin-toggle-btn.deactivated:hover {
    background: linear-gradient(135deg, #da190b, #c41e00);
    transform: scale(1.05);
}

/* Deactivated skin item styling */
.bskin-skin-item.deactivated {
    opacity: 0.5;
    position: relative;
}

.bskin-skin-item.deactivated::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    border-radius: 8px;
}

.bskin-skin-item.deactivated .bskin-skin-comparison {
    filter: grayscale(50%);
}