/* Main Container */
.cabine-de-fotos-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 10px 0 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* Header */
.cabine-de-fotos-header {
    text-align: center;
    margin-bottom: 10px;
    margin-top: 0;
}

.cabine-de-fotos-header h1 {
    color: #002f77;
    font-size: 2.1em;
    margin-bottom: 6px;
    line-height: 1.1;
}

.cabine-de-fotos-header p {
    color: #080830;
    font-size: 1em;
    margin-bottom: 0;
}

/* Content Area */
.cabine-de-fotos-content {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 5px 10px 0px 10px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Template Selection */
.template-selection {
    text-align: center;
    margin-bottom: 30px;
}

.template-selection h2 {
    color: #333;
    margin-bottom: 20px;
}

.template-card {
    background: #fff;
    border: 1.5px solid #e0e4ea;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 16px 10px 10px 10px;
    margin: 8px;
    transition: box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.template-card:hover, .template-card:active {
    border-color: #0073aa;
    box-shadow: 0 4px 16px rgba(0,115,170,0.10);
}
.templates-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    justify-items: center;
    margin-bottom: 10px;
}

.template-item {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 10px;
    transition: all 0.3s ease;
}

.template-item:hover {
    border-color: var(--primary-color, #0073aa);
    transform: scale(1.05);
}

.template-item img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px;
}

.template-item span {
    display: block;
    font-weight: bold;
    color: #333;
}

/* Photo Booth */
.photo-booth {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.camera-area {
    margin-top: 0px!important;
    margin: 5px 0 !important;
    text-align: center;
    width: 80% !important;
}

.camera-preview {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2px auto;
    background: transparent;
    overflow: hidden;
    aspect-ratio: var(--camera-aspect, 1/1);
    max-width: 95vw;
    max-height: 70vh;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.08);
}

#camera-preview {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain !important;
    object-position: center center;
    background: #000;
}

.template-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 1;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 2;
}

.camera-controls {
    display: none !important;
}

#back-to-templates {
    background-color: #666;
    color: white;
}

#back-to-templates:hover {
    background-color: #555;
}

/* Photo Preview */
.photo-preview {
    width: 60% !important;
    height: 60% !important;
    object-fit: contain;
    display: block;
}

.preview-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: #000;
    overflow: hidden;
    aspect-ratio: var(--camera-aspect, 1/1);
}

.preview-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    max-width: 100%;
    max-height: 100%;
}

/* Preview Controls - garantir botões lado a lado e responsivos */
.preview-controls,
#preview-actions {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}

.preview-controls .button,
#preview-actions .button {
    min-width: 140px;
    font-size: 1.1em;
    padding: 12px 0;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
    background: #28a745;
    color: #fff;
}

.preview-controls .button.button-primary,
#preview-actions .button:last-child {
    background: #15396a;
    color: #fff;
}

.preview-controls .button:active, 
.preview-controls .button:focus,
#preview-actions .button:active, 
#preview-actions .button:focus {
    filter: brightness(0.95);
}

/* Compartilhamento */
.share-options {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.share-options h2 {
    color: #333;
    margin-bottom: 20px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.share-buttons button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-facebook {
    background-color: #1877f2;
    color: white;
}

.share-instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
}

.share-twitter {
    background-color: #1da1f2;
    color: white;
}

.photo-url {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.photo-url input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #fff;
    border-top-color: var(--primary-color, #0073aa);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-overlay p {
    color: white;
    font-size: 18px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success Message */
.success-message {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    background-color: #1d9500 !important;
    color: white !important;
    padding: 15px 25px !important;
    border-radius: 5px !important;
    display: none !important;
    align-items: center !important;
    gap: 10px !important;
    z-index: 1000 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
    font-weight: 500 !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.success-message.show {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Footer */
.cabine-de-fotos-footer {
    text-align: center;
    color: #080830;
    padding: 0px 0;
    
}

/* Responsive Design */
@media (max-width: 768px) {
    .cabine-de-fotos-container {
        padding: 8px 4px 0 4px;
    }

    .templates-row {
        gap: 10px;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .template-card {
        max-width: 150px;
    }

    .camera-controls,
    .preview-controls,
    .share-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .photo-url {
        flex-direction: column;
    }
    
    /* Photo Preview */
.photo-preview {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    display: block;
}

    .camera-preview {
        max-width: 100vw;
        max-height: 60vh;
    }

    #camera-preview {
        max-height: 70vh;
    }

    #back-to-templates {
        background-color: #666;
        color: white;
        width: 100%;
        margin-bottom: 10px;
    }

    .cabine-de-fotos-header h1 {
        font-size: 1.2em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cabine-de-fotos-header {
        margin-bottom: 6px;
        margin-top: 0;
    }

    .cabine-de-fotos-content {
        padding: 6px 2px 10px 2px;
        margin-bottom: 8px;
    }

    .zoom-controls-desktop { display: none !important; }
    .zoom-controls-mobile { display: flex !important; align-items: center; }

    .camera-controls {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        padding: 16px 8px 24px 8px;
        z-index: 100;
        display: flex;
        flex-direction: column;
        gap: 12px;
        box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    }
    .camera-controls button {
        width: 100%;
        font-size: 1.1em;
        padding: 14px 0;
        border-radius: 8px;
    }

    .preview-controls {
        flex-direction: row;
        gap: 12px;
        justify-content: center;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255,255,255,0.98);
        z-index: 100;
        padding: 16px 8px 24px 8px;
        box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    }
    .preview-controls .button {
        width: 48%;
        min-width: 0;
        font-size: 1em;
        padding: 14px 0;
        border-radius: 8px;
    }

    .preview-container {
        max-width: 100vw;
        max-height: 70vh;
    }
}

@media (min-width: 769px) {
    .zoom-controls-mobile { display: none !important; }
    .zoom-controls-desktop { display: flex !important; margin-top: 0 !important; margin-bottom: 4px !important; }
    .zoom-controls-desktop {
        margin: 8px auto 4px auto !important;
    }
    .zoom-controls-desktop button {
        width: 26px;
        height: 26px;
        font-size: 1em;
        border-radius: 50%;
        padding: 0;
        margin: 0 4px;
        background: #fff;
        color: #15396a;
        border: none;
        box-shadow: 0 1px 2px rgba(0,0,0,0.06);
        transition: background 0.2s, color 0.2s;
        font-weight: bold;
    }
    .zoom-controls-desktop button:active, .zoom-controls-desktop button:focus, .zoom-controls-desktop button:hover {
        background: #d1d5db;
        color: #15396a;
    }
    #zoom-level {
        color: #15396a;
        font-weight: 600;
        min-width: 28px;
        text-align: center;
        font-size: 0.98em;
        background: none;
        margin: 0 2px;
    }
    .preview-container {
        max-width: 800px;
        max-height: 800px;
    }
    
    /* Aplicar a mesma regra do mobile para desktop - botões fixos na parte inferior */
    .preview-controls {
        flex-direction: row !important;
        gap: 12px !important;
        justify-content: center !important;
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(255,255,255,0.98) !important;
        z-index: 100 !important;
        padding: 16px 8px 24px 8px !important;
        box-shadow: 0 -2px 12px rgba(0,0,0,0.08) !important;
    }
    .preview-controls .button {
        width: 48% !important;
        min-width: 0 !important;
        font-size: 1em !important;
        padding: 14px 0 !important;
        border-radius: 8px !important;
    }
}
@media (max-width: 768px) {
    .zoom-controls-desktop { display: none !important; }
    .zoom-controls-mobile { display: flex !important; align-items: center; }
    .zoom-controls-mobile {
        position: absolute;
        top: 12px;
        left: 50%;
        transform: translateX(-50%);
        justify-content: center;
        width: auto;
        max-width: 90vw;
        background: rgba(0,0,0,0.7);
        box-shadow: 0 2px 8px rgba(0,0,0,0.18);
        border-radius: 18px;
        padding: 4px 6px;
        z-index: 10;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        height: 32px;
        min-width: 0;
    }
    .zoom-controls-mobile button {
        background: #fff;
        color: #222;
        border: none;
        font-size: 1.1em;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        cursor: pointer;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 1px 4px rgba(0,0,0,0.12);
        transition: background 0.2s, color 0.2s, box-shadow 0.2s;
        outline: none;
        margin: 0 4px;
        padding: 0;
    }
    .zoom-controls-mobile button:active, .zoom-controls-mobile button:focus {
        background: #0073aa;
        color: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    }
    #zoom-level-mobile {
        color: #fff !important;
        font-weight: bold;
        min-width: 36px;
        text-align: center;
        font-size: 1.25em;
        background: none;
        margin: 0 2px;
        display: inline-block;
        vertical-align: middle;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Controle de visibilidade do texto de seleção de template */
.template-selection-text {
    display: block;
}

.camera-area .template-selection-text {
    display: none;
}

/* Modal de seleção de câmera */
.camera-select-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.camera-select-content {
    background: #fff;
    padding: 30px 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    text-align: center;
}
#camera-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}
#camera-list li {
    margin: 10px 0;
}
#camera-list button {
    padding: 8px 16px;
    border-radius: 5px;
    border: none;
    background: #0073aa;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}
#camera-list button:hover {
    background: #005a87;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0,0,0,0.6);
    padding: 10px 24px;
    border-radius: 16px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.zoom-controls-desktop {
    position: static;
    justify-content: center;
    margin: 16px auto 0 auto;
    max-width: 180px;
    background: #e0e3ea;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.07);
    padding: 4px 4px;
    min-height: 0;
    height: 36px;
}
.zoom-controls-desktop button {
    width: 26px;
    height: 26px;
    font-size: 1em;
    border-radius: 50%;
    padding: 0;
    margin: 0 4px;
    background: #fff;
    color: #15396a;
    border: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    transition: background 0.2s, color 0.2s;
    font-weight: bold;
}
.zoom-controls-desktop button:active, .zoom-controls-desktop button:focus, .zoom-controls-desktop button:hover {
    background: #d1d5db;
    color: #15396a;
}
#zoom-level, #zoom-level-mobile {
    color: #15396a;
    font-weight: 600;
    min-width: 28px;
    text-align: center;
    font-size: 0.98em;
    background: none;
    margin: 0 2px;
}

#preview-actions {
    display: flex;
    flex-direction: row;
    gap: 16px;
    justify-content: center;
    margin-top: 20px;
}
#preview-actions .button {
    min-width: 140px;
    font-size: 1.1em;
    padding: 12px 0;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}
#preview-actions .button:first-child {
    background: #0073aa;
    color: #fff;
}
#preview-actions .button:last-child {
    background: #28a745;
    color: #fff;
}
#preview-actions .button:active, #preview-actions .button:focus {
    filter: brightness(0.95);
}

.button-share {
    background: #15396a !important;
    color: #fff !important;
}

.cabine-share-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}
.cabine-share-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    padding: 32px 24px 24px 24px;
    z-index: 9999;
    min-width: 320px;
    max-width: 420px;
    width: 98vw;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.cabine-share-modal-content h3 {
    font-size: 1.2em;
    margin-bottom: 12px;
    text-align: center;
}
.cabine-share-textarea {
    width: 100%;
    min-width: 220px;
    max-width: 420px;
    min-height: 60px;
    margin-bottom: 16px;
    border-radius: 8px;
    border: 1px solid #cce;
    padding: 10px;
    font-size: 1em;
    resize: none;
    background: #f8f9fa;
}
.cabine-share-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 12px;
}
.cabine-share-instruction {
    color: #1a237e;
    font-size: 1em;
    margin-bottom: 12px;
    text-align: center;
}
.cabine-share-modal .ok-btn {
    display: block;
    margin: 0 auto;
    min-width: 80px;
    margin-top: 8px;
}
@media (max-width: 600px) {
    .cabine-share-modal {
        min-width: 0;
        padding: 18px 6vw 18px 6vw;
    }
    .cabine-share-textarea {
        font-size: 0.98em;
    }
}

.cabine-share-network-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    padding: 32px 24px 24px 24px;
    z-index: 9999;
    min-width: 320px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.cabine-share-network-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.cabine-share-network-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 32px;
    width: 100%;
    max-width: 400px;
    justify-content: center;
    margin: 0 auto;
}
.cabine-share-network-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 18px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    min-width: 120px;
    min-height: 100px;
    font-size: 1.1em;
}
.cabine-share-network-option:hover {
    background: #e8eaf6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.cabine-share-network-option i {
    font-size: 32px;
    margin-bottom: 10px;
}
.cabine-share-network-option span {
    font-size: 1em;
    text-align: center;
}
.cabine-share-network-option .new-tab-indicator {
    font-size: 0.85em;
    color: #666;
    margin-top: 4px;
}
.cabine-share-network-close {
    position: absolute;
    top: 18px;
    right: 24px;
    font-size: 1.7em;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.2s;
}
.cabine-share-network-close:hover {
    color: #15396a;
}
@media (max-width: 900px) {
    .cabine-share-network-modal {
        max-width: 98vw;
        min-width: 0;
        padding: 18px 2vw 18px 2vw;
    }
    .cabine-share-network-options {
        gap: 16px 8px;
    }
}
@media (max-width: 600px) {
    .cabine-de-fotos-buttons {
        gap: 2vw !important;
        padding: 0 0 8px 0 !important;
        align-items: flex-end !important;
    }
    .cabine-btn-float {
        min-width: 64px !important;
        max-width: 90px !important;
        width: 90px !important;
        height: 44px !important;
        padding: 0 4px 0 4px !important;
        font-size: 0.92em;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        white-space: pre-line;
        line-height: 1.1;
        box-sizing: border-box;
        border-radius: 20px !important;
        margin: 2px 0 0 0 !important;
    }
    .cabine-btn-take-photo {
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 2px 0 0 0 !important;
    }
    .cabine-btn-take-photo img.btn-camera-icon {
        width: 24px !important;
        height: 24px !important;
    }
    .cabine-btn-float .btn-text {
        white-space: pre-line;
        text-align: center;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        padding: 0 !important;
        margin: 0 !important;
    }
    .cabine-btn-templates .btn-text:after,
    .cabine-btn-switch-camera .btn-text:after,
    .cabine-btn-mirror-camera .btn-text:after {
        content: "\A" !important;
        white-space: pre !important;
        display: inline !important;
    }
    .cabine-btn-switch-camera .btn-text {
        white-space: pre-line !important;
    }
}

/* Painel de Fotos - v2024-06-09-2 */
.cabine-de-fotos-painel {
    max-width: 98vw;
    margin: 0 auto;
    padding: 10px 0 30px 0;
}
.painel-header {
    text-align: center;
    margin-bottom: 32px;
}
.painel-header h1 {
    font-size: 2.2em;
    color: #333;
    margin-bottom: 8px;
}
.painel-header p {
    font-size: 1.1em;
    color: #666;
}
.mosaic-container {
    padding: 0 2vw;
}
.mosaic-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}
.mosaic-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.10);
    position: relative;
    background: #f7f7f7;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 0;
    cursor: pointer;
}
.mosaic-item img {
    display: block;
    border-radius: 0;
    margin: 0 auto;
    background: #222;
    width: auto;
    height: auto;
    transition: box-shadow 0.2s;
}
.mosaic-item:hover {
    transform: scale(1.04);
    z-index: 2;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}
.mosaic-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 12px;
    font-size: 0.98em;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}
.user-name {
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.social-icon {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1em;
    transition: color 0.2s ease;
    margin-left: 4px;
}

.social-icon:hover {
    color: #e0e0e0;
    text-decoration: none;
}

.social-icon i {
    font-size: 1.1em;
}

.linkedin-icon {
    color: #ffffff;
}

.instagram-icon {
    color: #ffffff;
}
@media (max-width: 900px) {
    .mosaic-row {
        gap: 10px;
    }
    .mosaic-item img {
        max-height: 180px !important;
        max-width: 140px !important;
    }
}
@media (max-width: 600px) {
    .social-icon {
        font-size: 1.0em;
        margin-left: 3px;
        color: #ffffff;
    }
    
    .social-icon i {
        font-size: 1.0em;
    }
    
    .linkedin-icon {
        color: #ffffff;
    }
    
    .instagram-icon {
        color: #ffffff;
    }
    
    .cabine-de-fotos-painel {
        padding: 0 2vw 20px 2vw;
    }
    .mosaic-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        justify-items: center;
    }
    .mosaic-item {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        margin: 0 !important;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .mosaic-item img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 220px !important;
        margin: 0 auto !important;
        display: block;
    }
    /* Painel: botão voltar e texto abaixo do título */
    .cabine-de-fotos-painel .cabine-btn,
    .cabine-de-fotos-painel .button.cabine-btn {
        font-size: 0.9em !important;
        padding: 8px 16px !important;
        min-width: 100px !important;
        border-radius: 8px !important;
        line-height: 1.2 !important;
    }
    .painel-header p {
        font-size: 1.18em !important;
        margin-bottom: 12px !important;
        line-height: 1.3 !important;
    }
    /* Cabine de Fotos: título responsivo */
    .cabine-de-fotos-header h1 {
        font-size: 1.25em !important;
        white-space: normal !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        text-align: center !important;
        width: 100% !important;
        max-width: 100vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 4vw !important;
        line-height: 1.2 !important;
    }
}
/* Modal de imagem ampliada */
.cabine-modal-img {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0; top: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
}
.cabine-modal-img.active { display: flex; }
.cabine-modal-img-content {
    position: relative;
    background: none;
    border-radius: 12px;
    max-width: 96vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.cabine-modal-img-content img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.25);
}
.cabine-modal-img-close {
    position: absolute;
    top: -18px;
    right: -18px;
    font-size: 2.2em;
    color: #fff;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s;
}
.cabine-modal-img-close:hover { background: #222; }

.mural-btn {
    background: #28a745 !important;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    min-width: 140px;
    font-size: 1.1em;
    padding: 12px 0;
    font-weight: 600;
    margin-left: 8px;
    margin-top: 12px;
    transition: background 0.2s, color 0.2s;
    display: inline-block;
    text-align: center;
}
.mural-btn:active, .mural-btn:focus, .mural-btn:hover {
    background: #218838 !important;
    color: #fff !important;
}

.cabine-btn {
    background: #15396a !important;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    min-width: 120px;
    font-size: 0.9em;
    padding: 8px 16px;
    font-weight: 600;
    margin: 18px auto 0 auto;
    transition: background 0.2s, color 0.2s;
    display: inline-block;
    text-align: center;
}
.cabine-btn:active, .cabine-btn:focus, .cabine-btn:hover {
    background: #0d254a !important;
    color: #fff !important;
}

.button.cabine-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 12px;
}

.button.cabine-btn:hover {
    background-color: #005177;
    color: white;
}


/* Estilo para o botão Lista-Admin */
.button.export-event-photos {
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
}

.button.export-event-photos:hover {
    background-color: #45a049;
    color: white;
}

/* Container dos botões em linha horizontal - SOLUÇÃO DEFINITIVA */
.cabine-buttons-row {
    display: flex !important;
    gap: 10px !important;
    margin-top: 12px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    flex-direction: row !important;
}

.cabine-buttons-row .button,
.cabine-buttons-row button,
.cabine-buttons-row a.button {
    padding: 10px !important;
    margin: 0 !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    display: inline-block !important;
    float: none !important;
    clear: none !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    flex-basis: auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: auto !important;
    position: relative !important;
    vertical-align: top !important;
}

/* Força todos os botões do header a ficarem inline */
.cabine-de-fotos-header .button,
.cabine-de-fotos-header button,
.cabine-de-fotos-header a.button {
    display: inline-block !important;
    margin: 0 !important;
    margin-right: 10px !important;
    margin-top: 12px !important;
    float: none !important;
    clear: none !important;
}

/* Botões flutuantes unificados */
.cabine-de-fotos-buttons {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 18px;
    padding: 18px 0 24px 0;
    background: none;
    pointer-events: none;
}
.cabine-btn-float {
    pointer-events: auto;
    border: none;
    outline: none;
    font-weight: 600;
    font-size: 1.1em;
    border-radius: 28px;
    padding: 10px 24px;
    min-width: 110px;
    min-height: 44px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    line-height: 1.1;
    cursor: pointer;
}
.cabine-btn-templates {
    background: #626164;
    color: #fff;
}
.cabine-btn-switch-camera {
    background: #002f77;
    color: #fff;
}
.cabine-btn-mirror-camera {
    background: #1d9500;
    color: #fff;
}
.cabine-btn-upload {
    background: #2b89f2;
    color: #fff;
}
.cabine-btn-take-photo {
    background: #fff;
    border: 3px solid #002f77;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
.cabine-btn-take-photo img.btn-camera-icon {
    width: 40px;
    height: 40px;
    display: block;
}
.cabine-btn-float:active, .cabine-btn-float:focus {
    filter: brightness(0.95);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.cabine-btn-float .btn-text { white-space: nowrap; }

@media (max-width: 900px) {
    .cabine-de-fotos-buttons {
        gap: 10px;
        padding: 12px 0 18px 0;
    }
    .cabine-btn-float {
        font-size: 1em;
        padding: 8px 0;
        min-width: 70px;
        min-height: 36px;
        width: 70px;
        justify-content: center;
    }
    .cabine-btn-take-photo {
        width: 60px !important;
        height: 60px!important;
        min-width: 60px!important;
        min-height: 60px!important;
        border-width: 1px!important;
    }
    .cabine-btn-take-photo img.btn-camera-icon {
        width: 40px!important;
        height: 40px!important;
    }
    .cabine-btn-float .btn-text { font-size: 0.98em; }
}
@media (max-width: 1024px) {
    .cabine-de-fotos-buttons {
        gap: 2vw !important;
        padding: 0 0 8px 0 !important;
        align-items: flex-end !important;
    }
    .cabine-btn-float {
        min-width: 64px !important;
        max-width: 90px !important;
        width: 90px !important;
        height: 44px !important;
        padding: 0 4px 0 4px !important;
        font-size: 0.92em;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        white-space: pre-line;
        line-height: 1.1;
        box-sizing: border-box;
        border-radius: 20px !important;
        margin: 2px 0 0 0 !important;
    }
    .cabine-btn-take-photo {
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 2px 0 0 0 !important;
    }
    .cabine-btn-take-photo img.btn-camera-icon {
        width: 24px !important;
        height: 24px !important;
    }
    .cabine-btn-float .btn-text {
        white-space: pre-line;
        text-align: center;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        padding: 0 !important;
        margin: 0 !important;
    }
    .cabine-btn-templates .btn-text:after,
    .cabine-btn-switch-camera .btn-text:after,
    .cabine-btn-mirror-camera .btn-text:after {
        content: "\A" !important;
        white-space: pre !important;
        display: inline !important;
    }
    .cabine-btn-switch-camera .btn-text {
        white-space: pre-line !important;
    }
}
/* Esconde .camera-controls antigo */
.camera-controls { display: none !important; }

/* Corrigir quebra de linha e esconder o "\A" literal */
.cabine-btn-float .btn-text:after {
    content: "";
}
@media (max-width: 600px) {
    .cabine-btn-templates .btn-text:after,
    .cabine-btn-switch-camera .btn-text:after,
    .cabine-btn-mirror-camera .btn-text:after {
        content: "\A";
        white-space: pre;
        display: inline;
    }
}

@media (min-width: 1025px) {
  .cabine-de-fotos-header .button,
  .cabine-de-fotos-header a.button,
  .cabine-de-fotos-header .mural-btn {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 0 18px !important;
    border-radius: 16px !important;
    font-size: 0.98em !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box;
  }
  .cabine-de-fotos-header .button i,
  .cabine-de-fotos-header a.button i,
  .cabine-de-fotos-header .mural-btn i {
    margin-right: 8px !important;
  }
  .zoom-controls-desktop {
    margin-top: 1px !important;
    margin-bottom: 4px !important;
  }
  .camera-area {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  .preview-controls .button {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 0 18px !important;
    border-radius: 12px !important;
    font-size: 0.98em !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box;
  }
  .preview-controls {
    margin-top: 10px !important;
  }
}

.processing-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  pointer-events: none;
  background: none;
}
.processing-box {
  background: rgba(0, 47, 119, 0.88);
  border-radius: 22px;
  padding: 32px 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: 60px;
  box-shadow: 0 4px 24px #0004;
}
.processing-text {
  color: #fff;
  font-size: 2em;
  font-weight: bold;
  text-align: center;
  letter-spacing: 1px;
  animation: blink 1s steps(2, start) infinite;
  text-shadow: 0 2px 8px #0008;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.template-dimension-group {
    margin-bottom: 30px;
    width: 100%;
}

.dimension-title {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #eee;
}

.templates-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    justify-items: center;
    margin-bottom: 10px;
}

.template-card {
    width: 100%;
    max-width: 220px;
}

@media (max-width: 1100px) {
    .templates-row {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 800px) {
    .templates-row {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .templates-row {
        grid-template-columns: 1fr;
    }
    .template-card {
        max-width: 100%;
    }
}

.cabine-btn-upload:disabled {
    background: #a0a0a0 !important;
    color: #fff !important;
    cursor: not-allowed;
    pointer-events: none;
}

.cabine-btn-upload:disabled:hover {
    background: #a0a0a0 !important;
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Estilos para Logo do Evento no Mural */
.painel-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: nowrap;
}

.event-logo-img {
    max-width: 80px;
    max-height: 80px;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    object-fit: contain;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    flex-shrink: 0;
}

.painel-title-container h1 {
    font-size: 2.2em;
    margin: 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.painel-header p {
    font-size: 1.1em;
    margin-bottom: 0;
    opacity: 0.9;
    text-align: center;
}

/* Centralização do botão Cabine de Fotos no mural */
.painel-header .cabine-btn {
    display: inline-block;
    margin: 20px auto 0 auto;
    text-align: center;
}

/* Estilos para Logo do Evento na Cabine */
.cabine-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: nowrap;
}

.cabine-event-logo-img {
    max-width: 60px;
    max-height: 60px;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    object-fit: contain;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px;
    flex-shrink: 0;
}

.cabine-title-container h1 {
    font-size: 1.6em;
    margin: 0;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cabine-de-fotos-header .template-selection-text {
    font-size: 0.9em;
    margin-bottom: 0;
    opacity: 0.9;
    text-align: center;
}

/* Responsividade para logos */
@media (max-width: 768px) {
    .painel-title-container {
        flex-direction: row;
        gap: 8px;
    }
    
    .event-logo-img {
        max-width: 60px;
        max-height: 60px;
    }
    
    .painel-title-container h1 {
        font-size: 1.8em;
    }
    
    .cabine-title-container {
        flex-direction: row;
        gap: 8px;
    }
    
    .cabine-event-logo-img {
        max-width: 50px;
        max-height: 50px;
    }
    
    .cabine-title-container h1 {
        font-size: 1.4em;
    }
    
    .camera-area {
    margin-top: 0px!important;
    margin: 5px 0 !important;
    text-align: center;
    width: 100% !important;
}
}