/* Instagram Mockup Generator Styles */

.mockup-container {
    flex: 1;
    padding: 0.5rem 0;
    overflow: hidden;
}

/* Dark Mode Styles for Post Details Sidebar */
[data-theme="dark"] .controls-sidebar {
    background: var(--bg-primary);
    border-color: var(--border-light);
}

[data-theme="dark"] .sidebar-title {
    color: var(--text-primary);
}

[data-theme="dark"] .section-title {
    color: var(--text-muted);
}

[data-theme="dark"] .form-label {
    color: var(--text-secondary);
}

[data-theme="dark"] .form-control {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 180, 182, 0.1);
}

[data-theme="dark"] .control-section {
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] .profile-pic-btn {
    border-color: var(--border-light);
    background: var(--bg-primary);
}

[data-theme="dark"] .profile-pic-btn:hover,
[data-theme="dark"] .profile-pic-btn.active {
    border-color: var(--accent-primary);
}

[data-theme="dark"] .file-upload-btn {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
    color: var(--text-secondary);
}

[data-theme="dark"] .file-upload-btn:hover {
    background: var(--border-light);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .switch-label {
    color: var(--text-primary);
}

[data-theme="dark"] .switch-slider {
    background: var(--border-medium);
}

[data-theme="dark"] .switch-slider::before {
    background: var(--text-primary);
}

[data-theme="dark"] .btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

[data-theme="dark"] .btn-secondary:hover {
    background: var(--border-light);
}

/* Dark Mode for Mockup Area */
[data-theme="dark"] .mockup-area {
    background: var(--bg-secondary);
}

[data-theme="dark"] .instagram-mockup {
    box-shadow: 0 10px 15px -3px rgb(255 255 255 / 0.1);
}

/* Dark Mode for Footer */
[data-theme="dark"] .footer {
    background: var(--bg-primary);
    border-top-color: var(--border-light);
}

[data-theme="dark"] .powered-by {
    color: var(--text-secondary);
}

[data-theme="dark"] .powered-by a {
    color: var(--accent-primary);
}

[data-theme="dark"] .powered-by a:hover {
    color: var(--accent-secondary);
}

.mockup-layout {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    height: calc(100vh - 150px);
    gap: 0;
}

/* Sidebar Styles */
.controls-sidebar {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    overflow-y: auto;
    padding: 1.5rem;
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-title i {
    width: 18px;
    height: 18px;
}

/* Control Sections */
.control-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.control-section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Profile Picture Options */
.profile-pic-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.profile-pic-btn {
    background: none;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-pic-btn:hover {
    border-color: var(--accent-primary);
}

.profile-pic-btn.active {
    border-color: var(--accent-primary);
}

.avatar-preview {
    width: 100%;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
}

/* File Upload */
.file-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-medium);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.file-upload-btn:hover {
    background: var(--border-light);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.file-upload-btn i {
    width: 16px;
    height: 16px;
}

/* Switch Toggle */
.switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.switch input {
    display: none;
}

.switch-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--border-medium);
    border-radius: 12px;
    transition: background 0.3s;
}

.switch-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
}

.switch input:checked + .switch-slider {
    background: var(--accent-primary);
}

.switch input:checked + .switch-slider::before {
    transform: translateX(20px);
}

.switch-label {
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* Instagram Mockup Area */
.mockup-area {
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: auto;
}

.instagram-mockup {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 2rem;
    max-width: 400px;
    width: 100%;
}

/* Instagram Post Styles */
.instagram-post {
    width: 100%;
    background: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Instagram Mockup Theme Override - More Specific */
.instagram-mockup[data-theme="dark"] .instagram-post {
    background: #000000 !important;
    color: white !important;
}

.instagram-mockup[data-theme="light"] .instagram-post {
    background: white !important;
    color: #262626 !important;
}

/* Post Header */
.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #efefef;
}

/* Instagram Mockup Theme Override for Post Header */
.instagram-mockup[data-theme="dark"] .post-header {
    border-bottom-color: #262626 !important;
}

.instagram-mockup[data-theme="light"] .post-header {
    border-bottom-color: #efefef !important;
}

.post-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(45deg, #405de6, #833ab4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.username-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.username {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
}

/* Instagram Mockup Theme Override for Username */
.instagram-mockup[data-theme="dark"] .username {
    color: white !important;
}

.instagram-mockup[data-theme="light"] .username {
    color: #262626 !important;
}

.verified-badge {
    width: 12px;
    height: 12px;
    margin-left: 4px;
}

.location {
    font-size: 12px;
    color: #8e8e8e;
}

.post-options svg {
    width: 16px;
    height: 16px;
    color: #262626;
}

/* Instagram Mockup Theme Override for Post Options */
.instagram-mockup[data-theme="dark"] .post-options svg {
    color: white !important;
}

.instagram-mockup[data-theme="light"] .post-options svg {
    color: #262626 !important;
}

/* Post Image */
.post-image {
    width: 100%;
    aspect-ratio: 1;
    background: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #8e8e8e;
    gap: 8px;
}

.image-placeholder i {
    width: 48px;
    height: 48px;
    stroke-width: 1;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Post Actions */
.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.save-button {
    display: flex;
    align-items: center;
}

.action-icon {
    width: 24px;
    height: 24px;
    color: #262626;
    cursor: pointer;
    stroke-width: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Instagram Mockup Theme Override for Action Icons */
.instagram-mockup[data-theme="dark"] .action-icon {
    color: white !important;
}

.instagram-mockup[data-theme="light"] .action-icon {
    color: #262626 !important;
}

.action-icon.heart.liked {
    fill: #ed4956;
    stroke: #ed4956;
}

.action-icon.bookmark.saved {
    fill: #262626;
}

/* Instagram Mockup Theme Override for Bookmark Saved */
.instagram-mockup[data-theme="dark"] .action-icon.bookmark.saved {
    fill: white !important;
}

.instagram-mockup[data-theme="light"] .action-icon.bookmark.saved {
    fill: #262626 !important;
}

/* Post Info */
.post-info {
    padding: 0 16px 16px 16px;
}

.likes-count {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 8px;
}

/* Instagram Mockup Theme Override for Likes Count */
.instagram-mockup[data-theme="dark"] .likes-count {
    color: white !important;
}

.instagram-mockup[data-theme="light"] .likes-count {
    color: #262626 !important;
}

.post-caption {
    margin-bottom: 8px;
    line-height: 18px;
}

.caption-text {
    font-size: 14px;
    color: #262626;
    margin-left: 4px;
}

/* Instagram Mockup Theme Override for Caption Text */
.instagram-mockup[data-theme="dark"] .caption-text {
    color: white !important;
}

.instagram-mockup[data-theme="light"] .caption-text {
    color: #262626 !important;
}

.view-comments {
    font-size: 14px;
    color: #8e8e8e;
    margin-bottom: 8px;
    cursor: pointer;
}

.post-time {
    font-size: 10px;
    color: #8e8e8e;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

/* Mockup Controls */
.mockup-controls {
    display: flex;
    gap: 1rem;
}


/* Responsive Design */
@media (max-width: 1400px) {
    .mockup-layout {
        padding: 0 1rem;
    }
}

@media (max-width: 1200px) {
    .mockup-layout {
        grid-template-columns: 280px 1fr;
    }
}

@media (max-width: 968px) {
    .mockup-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 40vh 1fr;
        height: calc(100vh - 150px);
        gap: 0;
    }
    
    .controls-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
        max-height: 40vh;
        overflow-y: auto;
    }
    
    .mockup-area {
        padding: 1rem;
        overflow-y: auto;
        justify-content: flex-start;
        display: flex;
        flex-direction: column;
    }
    
    .instagram-mockup {
        max-width: 320px;
        width: 100%;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .mockup-layout {
        padding: 0 0.5rem;
        gap: 0.5rem;
    }
    
    .controls-sidebar {
        padding: 1rem;
    }
    
    .mockup-area {
        padding: 0.5rem;
    }
    
    .control-section {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .profile-pic-options {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.25rem;
    }
    
    /* Mobile Controls Sidebar Sizing */
    .controls-sidebar {
        font-size: 12px;
    }
    
    .sidebar-title {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 0.7rem;
        margin-bottom: 0.75rem;
    }
    
    .form-label {
        font-size: 0.7rem;
        margin-bottom: 0.25rem;
    }
    
    .form-control {
        font-size: 12px;
        padding: 0.5rem;
    }
    
    .profile-pic-btn {
        padding: 0.125rem;
        border-radius: 4px;
    }
    
    .avatar-preview {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        font-size: 0.5rem;
        margin: 0 auto;
    }
    
    .switch-label {
        font-size: 0.75rem;
    }
    
    .btn {
        font-size: 11px;
        padding: 0.5rem 1rem;
    }
    
}

/* Footer Styles */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
    padding: 1rem;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
}

.powered-by {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
}

.powered-by a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.5rem;
    transition: all 0.2s ease;
}

.powered-by a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* Utilities */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }