/* directCamera.css - Styles for the direct camera implementation */

.direct-camera-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000;
    display: flex;
    flex-direction: column;
    z-index: 2100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.direct-camera-overlay.active {
    opacity: 1;
}

.direct-camera-header {
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.direct-camera-title {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.direct-camera-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.direct-camera-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.direct-camera-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: #000;
}

.direct-camera-spinner {
    animation: cameraSpin 1s linear infinite;
}

@keyframes cameraSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.direct-camera-footer {
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Ensure buttons have proper spacing */
.direct-camera-footer .camera-button:not(:last-child) {
    margin-right: 8px;
}

/* Camera actions container - right side buttons */
.camera-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Ensure proper spacing when switch button is hidden */
.camera-button[id^="switch_"][style*="display: none"] + .camera-button.primary {
    margin-left: 0;
}

.camera-button {
    background-color: #555;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    min-width: 44px; /* Minimum touch target size */
    justify-content: center;
}

/* Cancel button specific styles */
.camera-button.cancel {
    background-color: #444;
    min-width: 90px; /* Ensure button has enough width for text */
}

.camera-button.cancel:hover {
    background-color: #555;
}

.camera-button:hover {
    background-color: #666;
}

.camera-button.primary {
    background-color: #4CAF50;
}

.camera-button.primary:hover {
    background-color: #43A047;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Icons within buttons */
.camera-button i {
    font-size: 1.2rem;
}

.camera-button.primary:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* Text alternative for when icons are not available */
.camera-button .icon-text {
    display: none;
}

/* Show when icon fails to load */
.camera-button i:not([class*="bi-"]) + .btn-text + .icon-text {
    display: inline;
}

/* Artistic frame around the camera view */
.camera-frame {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 5;
}

.camera-frame-corner-tl,
.camera-frame-corner-tr,
.camera-frame-corner-bl,
.camera-frame-corner-br {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: rgba(255, 255, 255, 0.4);
    border-style: solid;
}

.camera-frame-corner-tl {
    top: -2px;
    left: -2px;
    border-width: 2px 0 0 2px;
}

.camera-frame-corner-tr {
    top: -2px;
    right: -2px;
    border-width: 2px 2px 0 0;
}

.camera-frame-corner-bl {
    bottom: -2px;
    left: -2px;
    border-width: 0 0 2px 2px;
}

.camera-frame-corner-br {
    bottom: -2px;
    right: -2px;
    border-width: 0 2px 2px 0;
}

/* Responsive adjustments for small screens */
@media (max-width: 576px) {
    .camera-button {
        padding: 8px 12px;
    }

    /* For very small screens, ensure buttons are properly sized */
    .camera-button.cancel {
        min-width: auto; /* Auto width on small screens */
        padding: 8px 12px;
    }

    /* Hide text but keep icons on small screens */
    .camera-button .btn-text {
        display: none;
    }

    /* Make icons more prominent when text is hidden */
    .camera-button i {
        font-size: 1.4rem;
        margin: 0;
    }

    .camera-button .icon-text {
        display: none;
    }

    /* When bootstrap icons fail to load on small screens */
    .camera-button i:not([class*="bi-"]) + .btn-text + .icon-text {
        display: inline;
    }

    /* Enhance tap area */
    .direct-camera-footer {
        padding: 10px;
    }
}

/* For medium-sized screens */
@media (min-width: 577px) and (max-width: 768px) {
    .camera-button {
        padding: 10px 15px;
    }

    .camera-button.cancel {
        min-width: 80px;
    }
}

/* Extra small screens adjustments */
@media (max-width: 320px) {
    .direct-camera-footer {
        padding: 10px 8px;
    }

    .camera-button {
        padding: 8px;
        min-width: 36px;
    }
}