/* =========================================
   AI CAMERA TOOL - NEW STYLES
   Light, Playful, Interactive Design
   ========================================= */

/* Video Mode Toggle */
.video-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    width: auto;
}

.video-mode-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: white;
}

.video-toggle.active {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
}

.video-toggle.active .video-mode-label {
    color: #ef4444;
}

/* Camera Mode Tabs */
.camera-mode-tabs {
    position: absolute;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 8px;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1015;
}

.camera-mode-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #6b7280;
}

.camera-mode-tab svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.camera-mode-tab span {
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.camera-mode-tab:hover {
    background: rgba(124, 179, 66, 0.1);
    color: #7cb342;
    transform: translateY(-2px);
}

.camera-mode-tab.active {
    background: linear-gradient(135deg, #7cb342, #689f38);
    color: white;
    box-shadow: 0 4px 16px rgba(124, 179, 66, 0.4);
}

.camera-mode-tab.active svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Plant Detection Overlay */
.plant-detection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.plant-frame .corner-tl,
.plant-frame .corner-tr,
.plant-frame .corner-bl,
.plant-frame .corner-br {
    border-color: #7cb342;
    box-shadow: 0 0 15px rgba(124, 179, 66, 0.6);
}

.plant-frame .scan-line {
    background: linear-gradient(90deg, transparent, #7cb342, transparent);
    box-shadow: 0 0 20px rgba(124, 179, 66, 0.8);
}

.plant-info-card {
    position: absolute;
    bottom: 180px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 340px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px;
    pointer-events: auto;
    animation: slideUpFade 0.4s ease-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.plant-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 12px;
}

.plant-info-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px 0;
    text-align: center;
}

.plant-info-card p {
    font-size: 0.9rem;
    color: #6b7280;
    font-style: italic;
    margin: 0 0 12px 0;
    text-align: center;
}

.confidence-badge {
    display: inline-block;
    background: linear-gradient(135deg, #7cb342, #689f38);
    color: white;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    width: 100%;
}

/* Barcode Scanner Overlay */
.barcode-scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.barcode-frame {
    position: relative;
    width: 80%;
    max-width: 320px;
    height: 180px;
}

.barcode-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3b82f6, transparent);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.8);
    animation: barcodeScan 2s infinite ease-in-out;
}

@keyframes barcodeScan {

    0%,
    100% {
        top: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

.barcode-corners .corner-tl,
.barcode-corners .corner-tr,
.barcode-corners .corner-bl,
.barcode-corners .corner-br {
    border-color: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.6);
}

.barcode-hint {
    margin-top: 24px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.barcode-result-card {
    position: absolute;
    bottom: 180px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 340px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px;
    pointer-events: auto;
    animation: slideUpFade 0.4s ease-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.barcode-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 12px;
}

.barcode-result-card h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px 0;
    text-align: center;
}

.barcode-result-card p {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
    text-align: center;
}

/* Video Recording Indicator */
.video-recording-indicator {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(239, 68, 68, 0.95);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 1020;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.rec-dot {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.rec-time {
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Post Form Enhancements */
.post-drafts-btn {
    background: transparent;
    border: none;
    color: #7cb342;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.post-drafts-btn:hover {
    background: rgba(124, 179, 66, 0.1);
}

/* Nutritional Info Card */
.nutrition-card {
    margin: 16px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(124, 179, 66, 0.15);
}

.nutrition-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.food-emoji {
    font-size: 2.5rem;
}

.nutrition-header h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.nutrition-macros {
    display: flex;
    gap: 8px;
}

.macro-pill {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.macro-label-small {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #6b7280;
    margin-bottom: 4px;
}

.macro-value-large {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
}

.protein-color {
    color: #ef4444;
}

.carbs-color {
    color: #f59e0b;
}

/* Editing Tools Bar */
.editing-tools-bar {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
    scrollbar-width: none;
}

.editing-tools-bar::-webkit-scrollbar {
    display: none;
}

.edit-tool-btn {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
}

.edit-tool-btn svg {
    width: 24px;
    height: 24px;
}

.edit-tool-btn span {
    font-size: 0.7rem;
    font-weight: 600;
}

.edit-tool-btn:hover {
    border-color: #7cb342;
    color: #7cb342;
    transform: translateY(-2px);
}

.edit-tool-btn.active {
    background: linear-gradient(135deg, #7cb342, #689f38);
    border-color: #7cb342;
    color: white;
    box-shadow: 0 4px 12px rgba(124, 179, 66, 0.3);
}

/* Editing Panels */
.editing-panel {
    padding: 20px 16px;
    background: white;
}

.adjustment-slider {
    margin-bottom: 20px;
}

.adjustment-slider label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.adjustment-slider .slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #e5e7eb;
    border-radius: 10px;
    outline: none;
}

.adjustment-slider .slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #7cb342, #689f38);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(124, 179, 66, 0.4);
}

.adjustment-slider .slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #7cb342, #689f38);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(124, 179, 66, 0.4);
}

/* Filters Grid */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

.filter-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

.filter-vivid {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.filter-warm {
    background: linear-gradient(135deg, #fb923c, #f97316);
}

.filter-cool {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

.filter-vintage {
    background: linear-gradient(135deg, #d4a574, #b8956a);
}

.filter-option span {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
}

.filter-option:hover {
    border-color: #7cb342;
    transform: translateY(-2px);
}

.filter-option.active {
    border-color: #7cb342;
    background: rgba(124, 179, 66, 0.05);
}

.filter-option.active span {
    color: #7cb342;
}

/* Stickers Grid */
.stickers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.sticker-btn {
    aspect-ratio: 1;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sticker-btn:hover {
    border-color: #7cb342;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 12px rgba(124, 179, 66, 0.2);
}

.sticker-btn:active {
    transform: scale(0.95) rotate(-5deg);
}

/* Crop Options */
.crop-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.crop-ratio-btn {
    flex: 1;
    min-width: 70px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.crop-ratio-btn:hover {
    border-color: #7cb342;
    color: #7cb342;
}

.crop-ratio-btn.active {
    background: linear-gradient(135deg, #7cb342, #689f38);
    border-color: #7cb342;
    color: white;
    box-shadow: 0 2px 8px rgba(124, 179, 66, 0.3);
}

/* Post Action Buttons */
.post-actions {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: white;
    border-top: 1px solid #e5e7eb;
}

.btn-post-primary,
.btn-post-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn-post-primary {
    background: linear-gradient(135deg, #7cb342, #689f38);
    color: white;
    box-shadow: 0 4px 16px rgba(124, 179, 66, 0.3);
}

.btn-post-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 179, 66, 0.4);
}

.btn-post-primary:active {
    transform: translateY(0);
}

.btn-post-primary svg {
    width: 20px;
    height: 20px;
}

.btn-post-secondary {
    background: white;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.btn-post-secondary:hover {
    border-color: #7cb342;
    color: #7cb342;
    background: rgba(124, 179, 66, 0.05);
}

.btn-post-secondary svg {
    width: 20px;
    height: 20px;
}

/* Responsive Adjustments */
@media (max-width: 380px) {
    .camera-mode-tabs {
        gap: 4px;
        padding: 6px;
    }

    .camera-mode-tab {
        padding: 10px 12px;
    }

    .camera-mode-tab span {
        font-size: 0.65rem;
    }

    .nutrition-macros {
        flex-direction: column;
    }
}

/* Smooth Transitions */
* {
    -webkit-tap-highlight-color: transparent;
}

button {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}