/**
 * Frontend Styles
 */

/* Hide elements during screenshot capture */
.luc-wpback-hidden-for-capture {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Feedback Button - Eye-catching design */
.luc-wpback-feedback-btn {
    position: fixed;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 14px 24px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4), 0 0 0 0 rgba(102, 126, 234, 0.7);
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4), 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6), 0 0 0 8px rgba(102, 126, 234, 0);
    }
}

.luc-wpback-feedback-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.6), 0 0 0 0 rgba(102, 126, 234, 0.7);
    animation: none;
}

.luc-wpback-feedback-btn:active {
    transform: translateY(-2px) scale(1.02);
}

.luc-wpback-feedback-btn .feedback-icon {
    font-size: 20px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Position: Bottom Right */
.luc-wpback-position-bottom-right {
    bottom: 30px;
    right: 30px;
}

/* Position: Left Sidebar */
.luc-wpback-position-left-sidebar {
    left: 0;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center;
    border-radius: 0 0 10px 10px;
    padding: 20px 16px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.luc-wpback-position-left-sidebar:hover {
    transform: translateY(-50%) rotate(-90deg) scale(1.05);
}

.luc-wpback-position-left-sidebar:active {
    transform: translateY(-50%) rotate(-90deg) scale(1.02);
}

/* Position: Right Sidebar */
.luc-wpback-position-right-sidebar {
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    transform-origin: center;
    border-radius: 0 0 10px 10px;
    padding: 20px 16px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.luc-wpback-position-right-sidebar:hover {
    transform: translateY(-50%) rotate(90deg) scale(1.05);
}

.luc-wpback-position-right-sidebar:active {
    transform: translateY(-50%) rotate(90deg) scale(1.02);
}

/* Feedback Modal */
.luc-wpback-feedback-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.luc-wpback-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.luc-wpback-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.luc-wpback-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.luc-wpback-close-modal {
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.luc-wpback-close-modal:hover {
    color: #333;
}

.luc-wpback-modal-body {
    padding: 25px;
}

.luc-wpback-form-group {
    margin-bottom: 20px;
}

.luc-wpback-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.luc-wpback-form-group .required {
    color: #d63638;
}

.luc-wpback-form-group .optional {
    color: #666;
    font-weight: normal;
    font-size: 12px;
}

.luc-wpback-form-group input[type="text"],
.luc-wpback-form-group input[type="email"],
.luc-wpback-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.luc-wpback-form-group input[type="text"]:focus,
.luc-wpback-form-group input[type="email"]:focus,
.luc-wpback-form-group textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.luc-wpback-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.luc-wpback-form-group input[type="checkbox"] {
    margin-right: 8px;
}

#screenshot-preview-container {
    margin-top: 15px;
}

/* Annotation Toolbar */
.annotation-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.annotation-toolbar .button {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

.annotation-toolbar .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.annotation-toolbar .button span {
    font-size: 18px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.annotation-toolbar .button:hover span {
    transform: scale(1.1);
}

.annotation-tool.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.annotation-tool.active:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    transform: translateY(-3px) scale(1.05);
}

/* Annotation Container */
.annotation-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin-bottom: 10px;
    width: 100%;
}

.annotation-container img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    width: 100%;
}

#annotation-canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: auto;
    border-radius: 4px;
}

#screenshot-preview {
    margin-bottom: 10px;
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

#screenshot-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

#screenshot-preview p {
    margin: 10px 0;
    color: #666;
}

#screenshot-preview .error {
    color: #d63638;
}

#retake-screenshot,
#add-screenshot-btn {
    margin-top: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
}

#retake-screenshot:hover,
#add-screenshot-btn:hover {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}

#retake-screenshot:active,
#add-screenshot-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.luc-wpback-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.luc-wpback-form-actions .button {
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.luc-wpback-cancel-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.luc-wpback-cancel-btn:hover {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}

.luc-wpback-submit-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.luc-wpback-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

.luc-wpback-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Screenshot Options Popup */
.luc-wpback-popup-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.luc-wpback-popup-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.luc-wpback-popup-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.luc-wpback-popup-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.luc-wpback-close-popup {
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.luc-wpback-close-popup:hover {
    color: #333;
}

.luc-wpback-popup-body {
    padding: 25px;
}

.popup-description {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
    font-size: 15px;
}

.screenshot-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.screenshot-option-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.screenshot-option-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.screenshot-option-btn:hover::before {
    width: 300px;
    height: 300px;
}

.screenshot-option-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

.screenshot-option-btn:active {
    transform: translateY(-2px) scale(1.01);
}

.screenshot-option-btn .option-icon {
    font-size: 28px;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.screenshot-option-btn:hover .option-icon {
    transform: scale(1.2) rotate(5deg);
}

.screenshot-option-btn .option-text {
    font-size: 17px;
    position: relative;
    z-index: 1;
}

/* Crop Modal */
.crop-modal-content {
    max-width: 90%;
    max-height: 90vh;
}

#crop-container {
    max-width: 100%;
    max-height: 70vh;
    overflow: auto;
    background: #f8f9fa;
    border-radius: 4px;
    padding: 10px;
}

#crop-image {
    max-width: 100%;
    display: block;
}

.crop-actions {
    margin-top: 15px;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.crop-actions .button {
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#cancel-crop-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

#cancel-crop-btn:hover {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}

#confirm-crop-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

#confirm-crop-btn:hover {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .luc-wpback-feedback-btn {
        padding: 12px 18px;
        font-size: 13px;
    }
    
    .luc-wpback-position-bottom-right {
        bottom: 20px;
        right: 20px;
    }
    
    .luc-wpback-position-left-sidebar,
    .luc-wpback-position-right-sidebar {
        padding: 16px 12px;
        font-size: 12px;
    }
    
    .luc-wpback-modal-content,
    .luc-wpback-popup-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .luc-wpback-modal-header,
    .luc-wpback-modal-body,
    .luc-wpback-popup-header,
    .luc-wpback-popup-body {
        padding: 20px;
    }
    
    .screenshot-option-btn {
        padding: 20px 18px;
        font-size: 15px;
    }
    
    .crop-modal-content {
        max-width: 95%;
    }
    
    .luc-wpback-form-actions .button {
        padding: 10px 20px;
        font-size: 13px;
    }
}
