/* Instagram Splitter Custom Styles */

/* Split Mode Selector */
.og-size-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.og-size-option {
    position: relative;
}

.og-size-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.og-size-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    min-height: 80px;
}

[data-bs-theme="dark"] .og-size-label {
    background: #1a1d20;
    border-color: #495057;
}

.og-size-label:hover {
    border-color: #0d6efd;
    background: #f8f9fa;
}

[data-bs-theme="dark"] .og-size-label:hover {
    background: #2c3034;
    border-color: #0d6efd;
}

.og-size-input:checked + .og-size-label {
    border-color: #0d6efd;
    background: #e7f1ff;
}

[data-bs-theme="dark"] .og-size-input:checked + .og-size-label {
    background: #1a2942;
    border-color: #0d6efd;
}

.og-size-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.og-size-icon img {
    width: 24px;
    height: 24px;
}

.og-size-text {
    flex: 1;
}

.og-size-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #212529;
}

[data-bs-theme="dark"] .og-size-name {
    color: #f8f9fa;
}

.og-size-desc {
    font-size: 0.875rem;
    color: #6c757d;
}

[data-bs-theme="dark"] .og-size-desc {
    color: #adb5bd;
}

/* Preview Grid */
.split-grid-preview {
    display: grid;
    gap: 0.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

[data-bs-theme="dark"] .split-grid-preview {
    background: #1a1d20;
}

.split-piece {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    border: 2px solid #dee2e6;
    background: #fff;
}

[data-bs-theme="dark"] .split-piece {
    border-color: #495057;
    background: #2c3034;
}

.split-piece-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.split-piece-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.split-piece:hover .split-piece-overlay {
    opacity: 1;
}

.split-piece-number {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.split-piece-download {
    background: #0d6efd;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.split-piece-download:hover {
    background: #0b5ed7;
}

.split-piece-download img {
    filter: brightness(0) invert(1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .split-grid-preview {
        padding: 0.5rem;
        gap: 0.25rem;
    }

    .split-piece-number {
        font-size: 1rem;
    }

    .split-piece-download {
        padding: 0.375rem 0.5rem;
    }

    .split-piece-download img {
        width: 14px !important;
        height: 14px !important;
    }
}
