/* LabPush Plugin Styles */

/* Pop-up Base Styles */
.labpush-popup {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    animation: labpushSlideIn 0.5s ease-out;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
}

/* Position Variants */
.labpush-popup-bottom-right {
    bottom: 20px;
    right: 20px;
}

.labpush-popup-bottom-left {
    bottom: 20px;
    left: 20px;
}

.labpush-popup-top-right {
    top: 20px;
    right: 20px;
}

.labpush-popup-top-left {
    top: 20px;
    left: 20px;
}

.labpush-popup-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Overlay for center position */
.labpush-popup-center .labpush-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

/* Pop-up Content */
.labpush-popup-content {
    position: relative;
    padding: 25px;
    background: inherit;
    border-radius: inherit;
}

/* Close Button */
.labpush-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.labpush-popup-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

/* Header */
.labpush-popup-header {
    margin-bottom: 20px;
    text-align: center;
}

.labpush-popup-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.labpush-popup-subtitle {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.4;
}

/* Form Styles */
.labpush-popup-form {
    margin-bottom: 15px;
}

.labpush-form-group {
    margin-bottom: 15px;
}

.labpush-email-input,
.labpush-name-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    background: #fff;
}

.labpush-email-input:focus,
.labpush-name-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.labpush-submit-button {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.labpush-submit-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.labpush-submit-button:active {
    transform: translateY(0);
}

.labpush-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Message Styles */
.labpush-popup-message {
    margin: 15px 0;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    display: none;
}

.labpush-popup-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.labpush-popup-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Footer */
.labpush-popup-footer {
    text-align: center;
    margin-top: 15px;
}

.labpush-popup-footer small {
    font-size: 11px;
    opacity: 0.6;
}

.labpush-popup-footer a {
    color: inherit;
    text-decoration: none;
}

.labpush-popup-footer a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes labpushSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes labpushSlideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

.labpush-popup.closing {
    animation: labpushSlideOut 0.3s ease-in forwards;
}

/* Loading State */
.labpush-popup-form.loading .labpush-submit-button {
    position: relative;
    color: transparent;
}

.labpush-popup-form.loading .labpush-submit-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: labpushSpin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 480px) {
    .labpush-popup {
        width: calc(100vw - 40px) !important;
        max-width: none;
        left: 20px !important;
        right: 20px !important;
        bottom: 20px !important;
        top: auto !important;
        transform: none !important;
    }
    
    .labpush-popup-center {
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: calc(100vw - 40px) !important;
    }
    
    .labpush-popup-content {
        padding: 20px;
    }
    
    .labpush-popup-title {
        font-size: 18px;
    }
    
    .labpush-popup-subtitle {
        font-size: 13px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .labpush-popup {
        border: 2px solid;
    }
    
    .labpush-email-input,
    .labpush-name-input {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .labpush-popup,
    .labpush-submit-button,
    .labpush-popup-close,
    .labpush-email-input,
    .labpush-name-input {
        animation: none;
        transition: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .labpush-popup {
        background: #2d3748;
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    .labpush-email-input,
    .labpush-name-input {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .labpush-email-input::placeholder,
    .labpush-name-input::placeholder {
        color: #a0aec0;
    }
    
    .labpush-popup-close {
        color: #a0aec0;
    }
    
    .labpush-popup-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #e2e8f0;
    }
}

