/* LinkSentry Frontend Styles */

.ls-box {
    border: none;
    padding: 0;
    display: inline-block;
    background: transparent;
    margin: 1rem 0;
}

.ls-box--button .ls-open {
    cursor: pointer;
    background: #2271b1;
    border: 1px solid #2271b1;
    padding: 0.625rem 1.25rem;
    color: #fff;
    font-size: 0.9375rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    border-radius: 2px;
    transition: all 0.2s;
    font-weight: 500;
}

.ls-box--button .ls-open:hover,
.ls-box--button .ls-open:focus {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
    text-decoration: none;
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Default style for other cases (text-link, large-box) */
.ls-open {
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    color: #2271b1;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    text-decoration: none;
    transition: color 0.2s;
}

.ls-open:hover,
.ls-open:focus {
    color: #135e96;
    text-decoration: underline;
    outline: none;
}

.ls-open .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Modal */
.ls-modal[hidden] {
    display: none !important;
}

.ls-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ls-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.ls-modal__inner {
    position: relative;
    background: #fff;
    padding: 1.5rem 1.75rem;
    border-radius: 0.5rem;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.ls-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: transparent;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: #646970;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    transition: background-color 0.2s;
}

.ls-modal__close:hover,
.ls-modal__close:focus {
    background: #f0f0f1;
    color: #1d2327;
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.ls-modal__close .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.ls-modal h2 {
    margin: 0 0 1.25rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1d2327;
}

.ls-form p {
    margin: 0 0 1rem 0;
}

.ls-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: #1d2327;
    font-size: 0.875rem;
}

.ls-form .required {
    color: #d63638;
}

.ls-form select,
.ls-form textarea,
.ls-form input[type="email"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #8c8f94;
    border-radius: 2px;
    font-size: 0.875rem;
    font-family: inherit;
    box-sizing: border-box;
}

.ls-form select:focus,
.ls-form textarea:focus,
.ls-form input[type="email"]:focus {
    border-color: #2271b1;
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.ls-form textarea {
    resize: vertical;
    min-height: 80px;
}

.ls-form__actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.ls-form__actions .button {
    flex: 1;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s;
}

.ls-form__actions .button-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.ls-form__actions .button-primary:hover:not(:disabled) {
    background: #135e96;
    border-color: #135e96;
}

.ls-form__actions .button-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ls-form__actions .ls-close {
    background: #f6f7f7;
    border-color: #dcdcde;
    color: #2c3338;
}

.ls-form__actions .ls-close:hover {
    background: #f0f0f1;
    border-color: #8c8f94;
}

/* Honeypot */
.ls-hp {
    position: absolute;
    left: -9999em;
    opacity: 0;
    pointer-events: none;
}

/* Success/Error Messages */
.ls-message {
    padding: 0.75rem 1rem;
    border-radius: 2px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.ls-message--success {
    background: #00a32a;
    color: #fff;
}

.ls-message--error {
    background: #d63638;
    color: #fff;
}

/* Loading state */
.ls-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Text Link Style */
.ls-box--text-link {
    border: none;
    padding: 0;
    background: transparent;
    display: inline-block;
}

.ls-box--text-link .ls-open {
    text-decoration: none;
    font-size: 1rem;
    color: #2271b1;
}

.ls-box--text-link .ls-open:hover,
.ls-box--text-link .ls-open:focus {
    text-decoration: underline;
    color: #135e96;
}

/* Large Box Style */
.ls-box--large-box {
    width: 100%;
    display: block;
    border: none;
    padding: 1.5rem;
    background: #f6f7f7;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.ls-box-large {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.ls-box-large__info {
    margin: 0;
    font-size: 1rem;
    color: #1d2327;
    line-height: 1.5;
    flex: 1;
    text-align: left;
}

.ls-box-large .ls-open.button {
    flex-shrink: 0;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    border-radius: 2px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid;
}

.ls-box-large .ls-open.button:hover,
.ls-box-large .ls-open.button:focus {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
    text-decoration: none;
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

