/* Newsletter Side Tab Widget - Palce Lizac */

/* ========================
   WIDGET CONTAINER
   ======================== */
.mot-nl-widget {
    position: fixed;
    left: 0;
    bottom: 20%;
    z-index: 99999;
}

/* ========================
   TAB - pionowy przycisk na lewej krawedzi
   ======================== */
.mot-nl-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    background: #59983E;
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    writing-mode: vertical-lr;
    text-orientation: mixed;
    box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, opacity 0.25s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.mot-nl-tab:hover {
    background: #4a7f33;
}

.mot-nl-tab-icon {
    display: flex;
    flex-shrink: 0;
}

.mot-nl-tab-text {
    white-space: nowrap;
}

/* Ukryj tab gdy panel otwarty */
.mot-nl-widget.is-open .mot-nl-tab {
    opacity: 0;
    pointer-events: none;
}

/* ========================
   PANEL - wysuwa sie z lewej w prawo
   ======================== */
.mot-nl-panel {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 340px;
    background: #fff;
    border-radius: 0 12px 12px 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    overflow-y: auto;
    max-height: 80vh;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mot-nl-widget.is-open .mot-nl-panel {
    transform: translateX(0);
}

/* Header panelu */
.mot-nl-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: #59983E;
    color: #fff;
    position: sticky;
    top: 0;
}

.mot-nl-header-icon {
    display: flex;
    flex-shrink: 0;
}

.mot-nl-title {
    flex: 1;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

/* Przycisk zamknij - czysty bialy X */
.mot-nl-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 22px;
    font-weight: 300;
    line-height: 1;
    padding: 0;
    width: 24px;
    height: 24px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.mot-nl-close-btn:hover {
    opacity: 1;
}

/* Body */
.mot-nl-body {
    padding: 18px 16px;
}

/* Opis */
.mot-nl-description {
    font-size: 13px;
    color: #555;
    margin: 0 0 14px 0;
    line-height: 1.5;
}

.mot-nl-description a {
    color: #59983E;
    text-decoration: underline;
}

/* Formularz */
.mot-nl-form {
    margin: 0;
}

.mot-nl-field {
    margin-bottom: 10px;
}

.mot-nl-input {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    background: #fff;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.mot-nl-input:focus {
    border-color: #59983E;
}

.mot-nl-input::placeholder {
    color: #aaa;
}

/* RODO checkbox */
.mot-nl-gdpr-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 12px 0;
    cursor: pointer;
}

.mot-nl-gdpr-checkbox {
    flex-shrink: 0;
    margin-top: 2px;
}

.mot-nl-gdpr-text {
    font-size: 11px;
    color: #666;
    line-height: 1.4;
}

.mot-nl-gdpr-text a {
    color: #59983E;
    text-decoration: underline;
}

.mot-nl-gdpr-label.has-error .mot-nl-gdpr-checkbox {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 1px #dc2626;
}

.mot-nl-submit {
    display: block;
    width: 100%;
    padding: 11px 16px;
    background: #59983E;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mot-nl-submit:hover {
    background: #4a7f33;
}

.mot-nl-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Komunikaty */
.mot-nl-message {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
}

.mot-nl-message.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

/* Stan sukcesu */
.mot-nl-success {
    text-align: center;
    padding: 12px 0;
}

.mot-nl-success svg {
    margin-bottom: 8px;
}

.mot-nl-success p {
    font-size: 15px;
    font-weight: 600;
    color: #59983E;
    margin: 0;
}

/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 480px) {
    .mot-nl-widget {
        bottom: 0;
        left: 0;
        right: 0;
    }

    .mot-nl-tab {
        writing-mode: horizontal-tb;
        text-orientation: initial;
        border-radius: 8px 8px 0 0;
        padding: 10px 20px;
        width: auto;
        display: inline-flex;
    }

    .mot-nl-panel {
        width: 100%;
        border-radius: 12px 12px 0 0;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
        bottom: 0;
        left: 0;
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mot-nl-widget.is-open .mot-nl-panel {
        transform: translateY(0);
    }
}
