/**
 * Frontend styles for SeekMake widgets.
 *
 * @since      1.0.0
 * @package    SeekMake_Core
 */

/* Modal Base Styles */
.seekmake-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}

.seekmake-modal.active {
    display: flex;
}

.seekmake-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.seekmake-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.seekmake-modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    z-index: 2;
}

.seekmake-modal-close:hover {
    background: #f44336;
    color: #fff;
    transform: scale(1.1);
}

.seekmake-modal-close:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.seekmake-modal-body {
    flex: 1;
    overflow: hidden;
    border-radius: 8px;
}

.seekmake-modal-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
}

/* Prevent body scroll when modal is open */
body.seekmake-modal-open {
    overflow: hidden;
}

/* Inline Widget Containers */
.seekmake-quote-container,
.seekmake-dashboard-container,
.seekmake-bot-widget {
    position: relative;
    width: 100%;
    margin: 20px 0;
}

.seekmake-embed-iq,
.seekmake-embed-dashboard,
.seekmake-embed-bot {
    width: 100%;
    border: 0;
    min-height: 600px;
}

/* Widget Buttons */
.seekmake-widget-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.seekmake-widget-button:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Button Styles */
.seekmake-button-primary {
    background: #2271b1;
    color: #fff;
}

.seekmake-button-primary:hover {
    background: #135e96;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.seekmake-button-secondary {
    background: #50575e;
    color: #fff;
}

.seekmake-button-secondary:hover {
    background: #3c434a;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(80, 87, 94, 0.3);
}

.seekmake-button-outline {
    background: transparent;
    color: #2271b1;
    border: 2px solid #2271b1;
}

.seekmake-button-outline:hover {
    background: #2271b1;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.seekmake-button-link {
    background: transparent;
    color: #2271b1;
    text-decoration: underline;
    padding: 8px 16px;
}

.seekmake-button-link:hover {
    color: #135e96;
    text-decoration: none;
}

/* Notification */
.seekmake-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 400px;
}

.seekmake-notification.active {
    opacity: 1;
    transform: translateX(0);
}

.seekmake-notification-success {
    border-left: 4px solid #46b450;
}

.seekmake-notification-error {
    border-left: 4px solid #dc3232;
}

.seekmake-notification-warning {
    border-left: 4px solid #ffb900;
}

.seekmake-notification-info {
    border-left: 4px solid #2271b1;
}

/* Loading State */
.seekmake-loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.seekmake-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    animation: seekmake-spin 1s linear infinite;
}

@keyframes seekmake-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .seekmake-modal-content {
        width: 95%;
        height: 95vh;
    }

    .seekmake-modal-close {
        top: -10px;
        right: -10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    .seekmake-widget-button {
        width: 100%;
        padding: 14px 20px;
    }

    .seekmake-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media screen and (max-width: 480px) {
    .seekmake-modal-content {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .seekmake-modal-body {
        border-radius: 0;
    }

    .seekmake-modal-iframe {
        border-radius: 0;
    }
}

/* Accessibility */
.seekmake-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
*:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Widget Container Spacing */
.seekmake-widget-wrapper {
    margin: 30px 0;
}

/* Centered Widget Buttons */
.seekmake-widget-center {
    text-align: center;
}

.seekmake-widget-left {
    text-align: left;
}

.seekmake-widget-right {
    text-align: right;
}
