/**
 * Free Password Generator Tool - Muster Plugin Module
 * Version: 2.0.4 (Final – No shadows, consistent sizing)
 */

/* ============================================
   BASE & CONTAINER
   ============================================ */
.fpgt-container {
    max-width: 720px;
    margin: 30px auto;
    padding: 0 16px;
    font-family: 'Manrope', sans-serif;
    box-sizing: border-box;
}

.fpgt-tool {
    background: #ffffff;
    border: 1px solid #dbe4ea;
    border-radius: 10px;
    padding: 28px 30px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.fpgt-title {
    color: #111827;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 25px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8f2f4;
    letter-spacing: -0.3px;
}

.fpgt-tool label,
.fpgt-result-group label,
.fpgt-history h4,
.fpgt-multi-list h4 {
    color: #374151;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 8px;
    display: block;
}

.fpgt-note small {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.5;
}

/* ============================================
   MODE TABS
   ============================================ */
.fpgt-mode-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    border-bottom: 1px solid #e8f2f4;
    padding-bottom: 16px;
}

.fpgt-mode-btn {
    background: #ffffff;
    border: 1px solid #dbe4ea;
    border-radius: 10px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #0e7e94;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    font-family: 'Manrope', sans-serif;
}

.fpgt-mode-btn.active {
    background: #0e7e94 !important;
    border-color: #0e7e94 !important;
    color: #ffffff !important;
}

.fpgt-mode-btn:hover:not(.active) {
    background: #e8f2f4;
    border-color: #0e7e94;
    color: #0a6475;
    transform: translateY(-1px);
}

.fpgt-mode-btn:focus-visible {
    outline: 2px solid #0e7e94;
    outline-offset: 2px;
}

/* ============================================
   MODE PANELS
   ============================================ */
.fpgt-mode-panel {
    display: none;
    animation: fadeIn 0.25s ease;
}

.fpgt-mode-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   FORM INPUTS & CONTROLS
   ============================================ */
.fpgt-input-group,
.fpgt-checkbox-group {
    margin-bottom: 24px;
}

.fpgt-length-input,
.fpgt-pattern-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dbe4ea;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Manrope', sans-serif;
    background: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
    color: #111827;
}

.fpgt-select {
    width: 100%;
    padding: 12px 36px 12px 16px;
    border: 1px solid #dbe4ea;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Manrope', sans-serif;
    background: #ffffff;
    transition: all 0.2s ease;
    line-height: 1.4;
    height: auto;
    min-height: 48px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%230e7e94" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    cursor: pointer;
    color: #111827;
}

.fpgt-length-input:focus,
.fpgt-pattern-input:focus,
.fpgt-select:focus {
    outline: none;
    border-color: #0a6475;
}

.fpgt-length-hint {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
}

/* Checkbox Group */
.fpgt-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.fpgt-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    transition: color 0.2s;
}

.fpgt-checkbox-label:hover {
    color: #0e7e94;
}

.fpgt-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #0e7e94;
    cursor: pointer;
}

/* ============================================
   STRENGTH METER
   ============================================ */
.fpgt-strength-meter {
    margin: 24px 0;
}

.fpgt-strength-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.fpgt-strength-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--strength-width, 0%);
    background: #14b8c4;
    border-radius: 20px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fpgt-strength-text {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

/* ============================================
   BUTTONS - SAME SIZE AS MODE TABS
   ============================================ */
.fpgt-btn,
.fpgt-btn-small {
    background-color: #0e7e94;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-family: 'Manrope', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.2;
    white-space: nowrap;
}

.fpgt-btn-small {
    padding: 6px 14px;
    font-size: 12px;
    text-transform: none;
    letter-spacing: normal;
}

.fpgt-btn:hover,
.fpgt-btn-small:hover {
    background-color: #0a6475;
    transform: translateY(-1px);
}

.fpgt-btn:active,
.fpgt-btn-small:active {
    transform: translateY(0);
}

.fpgt-btn:focus-visible,
.fpgt-btn-small:focus-visible {
    outline: 2px solid #0e7e94;
    outline-offset: 2px;
    background-color: #0a6475;
}

.fpgt-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    justify-content: center;
}

.fpgt-btn {
    flex: 0 1 auto;
    min-width: auto;
}

/* Secondary / text buttons */
.fpgt-icon-btn,
#fpgt-clear-history {
    background: transparent;
    border: none;
    color: #0e7e94;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 12px;
    transition: all 0.2s;
    border-radius: 8px;
}

.fpgt-icon-btn:hover,
#fpgt-clear-history:hover {
    color: #0a6475;
    background: #e8f2f4;
    text-decoration: none;
}

/* ============================================
   RESULT DISPLAY
   ============================================ */
.fpgt-result-group {
    margin-bottom: 24px;
}

.fpgt-result-container {
    position: relative;
}

.fpgt-result-box {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #dbe4ea;
    border-radius: 10px;
    font-size: 18px;
    font-family: 'SF Mono', 'Menlo', monospace;
    background: #fafcfc;
    color: #0e7e94;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-sizing: border-box;
    transition: all 0.2s;
}

.fpgt-result-box:focus {
    outline: none;
    border-color: #0a6475;
    background: #ffffff;
}

/* ============================================
   MULTI PASSWORD LIST
   ============================================ */
.fpgt-multi-list {
    background: #f8fafc;
    border-radius: 10px;
    padding: 18px;
    margin: 20px 0;
    border: 1px solid #e8f2f4;
}

.fpgt-multi-list h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #1f2937;
}

.fpgt-multi-list ul {
    max-height: 240px;
    overflow-y: auto;
    list-style: none;
    padding: 0;
    margin: 0 0 14px 0;
}

.fpgt-multi-list li {
    font-family: monospace;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    background: #ffffff;
    border-radius: 8px;
    margin-bottom: 6px;
}

.fpgt-multi-list li button {
    background: #e8f2f4;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    color: #0e7e94;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.fpgt-multi-list li button:hover {
    background: #0e7e94;
    color: #ffffff;
}

/* ============================================
   HISTORY SECTION
   ============================================ */
.fpgt-history {
    margin-top: 24px;
    border-top: 1px solid #e8f2f4;
    padding-top: 20px;
}

.fpgt-history h4 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 12px 0;
    font-size: 16px;
}

#fpgt-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 160px;
    overflow-y: auto;
}

#fpgt-history-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #e8f2f4;
    font-family: monospace;
    font-size: 13px;
    gap: 12px;
    background: #ffffff;
    border-radius: 8px;
    margin-bottom: 6px;
}

#fpgt-history-list li button {
    background: #e8f2f4;
    border: none;
    border-radius: 8px;
    padding: 5px 14px;
    color: #0e7e94;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

#fpgt-history-list li button:hover {
    background: #0e7e94;
    color: #ffffff;
}

/* ============================================
   SECURITY NOTE & ERROR
   ============================================ */
.fpgt-note {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    padding: 14px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e8f2f4;
}

.fpgt-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
    border-left: 4px solid #dc2626;
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .fpgt-container {
        padding: 0 12px;
        margin: 20px auto;
    }
    .fpgt-tool {
        padding: 20px;
    }
    .fpgt-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    .fpgt-checkbox-group {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .fpgt-button-group {
        flex-direction: column;
        gap: 10px;
    }
    .fpgt-btn {
        width: 100%;
        padding: 10px 20px;
        font-size: 15px;
        white-space: normal;
    }
    .fpgt-mode-tabs {
        justify-content: center;
        gap: 8px;
    }
    .fpgt-mode-btn {
        padding: 6px 14px;
        font-size: 13px;
    }
    .fpgt-select {
        min-height: 46px;
        font-size: 15px;
        padding: 10px 32px 10px 14px;
    }
    .fpgt-result-box {
        font-size: 16px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .fpgt-tool {
        padding: 16px;
    }
    .fpgt-mode-btn {
        padding: 5px 12px;
        font-size: 12px;
    }
    .fpgt-length-input,
    .fpgt-pattern-input {
        padding: 10px 12px;
        font-size: 15px;
    }
    .fpgt-multi-list li,
    #fpgt-history-list li {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .fpgt-btn-small {
        padding: 6px 14px;
    }
}

/* ============================================
   ACCESSIBILITY & PERFORMANCE
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .fpgt-mode-panel,
    .fpgt-strength-bar::before,
    .fpgt-btn,
    .fpgt-mode-btn {
        transition: none;
        animation: none;
    }
}

button,
button:focus,
button:active,
.fpgt-btn,
.fpgt-btn-small,
.fpgt-mode-btn {
    -webkit-tap-highlight-color: transparent;
}