/* ==========================================================================
   Password Generator - Playful Cyan/Teal Theme Styles
   ========================================================================== */

/* Header title white on cyan */
.calculator-wrapper h1 {
    color: #ffffff;
}

/* Calculator wrapper - relative for sparkle effects */
.calculator-wrapper {
    position: relative;
    overflow: hidden;
}

/* Button icon styling */
.btn-icon {
    display: inline-block;
    font-size: 1.25rem;
    margin-right: 4px;
}

/* ==========================================================================
   Slider Styling
   ========================================================================== */
.slider-container {
    padding: 8px 0;
}

.password-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #cffafe 0%, #06b6d4 50%, #0891b2 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.password-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0891b2;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(8, 145, 178, 0.4);
    transition: all 0.2s ease;
}

.password-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(8, 145, 178, 0.5);
}

.password-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0891b2;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(8, 145, 178, 0.4);
    transition: all 0.2s ease;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 12px;
    color: #666;
}

.length-value {
    display: inline-block;
    min-width: 28px;
    padding: 2px 8px;
    background: #ecfeff;
    border-radius: 12px;
    color: #0891b2;
    font-weight: 600;
    text-align: center;
    margin-left: 8px;
}

/* ==========================================================================
   Checkbox Styling
   ========================================================================== */
.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    color: var(--color-text-primary);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-custom::after {
    content: "";
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease;
}

.checkbox-label input:checked + .checkbox-custom {
    background: #06b6d4;
    border-color: #06b6d4;
}

.checkbox-label input:checked + .checkbox-custom::after {
    transform: rotate(45deg) scale(1);
}

.checkbox-label:hover .checkbox-custom {
    border-color: #06b6d4;
}

.checkbox-text {
    line-height: 1.4;
}

/* ==========================================================================
   Results Section
   ========================================================================== */
.password-results {
    margin-top: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 50%, #a5f3fc 100%);
    border-radius: 16px;
    border: 2px solid #22d3ee;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.password-results::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 60%
    );
    animation: shimmer 3s infinite linear;
    pointer-events: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.password-results.hidden {
    display: none;
}

/* ==========================================================================
   Password Display
   ========================================================================== */
.password-display-container {
    display: flex;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 16px;
}

.password-display {
    flex: 1;
    background: white;
    border: 2px solid #22d3ee;
    border-radius: 12px;
    padding: 16px 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.25rem;
    font-weight: 600;
    color: #0891b2;
    word-break: break-all;
    text-align: left;
    min-height: 60px;
    display: flex;
    align-items: center;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
}

.copy-inline-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 16px;
    background: #0891b2;
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
    min-width: 70px;
}

.copy-inline-btn:hover {
    background: #0e7490;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.4);
}

.copy-inline-btn.copied {
    background: #059669;
}

.copy-inline-btn .copy-text {
    font-size: 12px;
    font-weight: 500;
}

@keyframes copyPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.copy-inline-btn.copied {
    animation: copyPulse 0.3s ease;
}

/* ==========================================================================
   Strength Meter
   ========================================================================== */
.strength-container {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.strength-meter {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease, background 0.5s ease;
    width: 0%;
}

.strength-fill.weak {
    width: 25%;
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.strength-fill.medium {
    width: 50%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.strength-fill.strong {
    width: 75%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.strength-fill.very-strong {
    width: 100%;
    background: linear-gradient(90deg, #06b6d4, #22d3ee);
}

.strength-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.strength-label {
    color: #0891b2;
}

.strength-label strong {
    font-weight: 700;
}

.strength-label strong.weak {
    color: #ef4444;
}

.strength-label strong.medium {
    color: #f59e0b;
}

.strength-label strong.strong {
    color: #22c55e;
}

.strength-label strong.very-strong {
    color: #06b6d4;
}

.entropy-label {
    color: #666;
    font-size: 13px;
}

/* ==========================================================================
   Action Buttons
   ========================================================================== */
.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.generate-again-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: #0891b2;
    color: white;
}

.generate-again-button:hover {
    background: #0e7490;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.4);
}

.share-trigger-btn {
    background: white;
    color: #0891b2;
    border: 2px solid #0891b2;
}

.share-trigger-btn:hover {
    background: #ecfeff;
    transform: translateY(-2px);
}

/* ==========================================================================
   Password History
   ========================================================================== */
.password-history {
    margin-top: 24px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
}

.password-history.hidden {
    display: none;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.history-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.clear-history-btn {
    padding: 4px 12px;
    font-size: 13px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-history-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.history-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    word-break: break-all;
}

.history-item:last-child {
    margin-bottom: 0;
}

.history-item .password-text {
    flex: 1;
    color: #0891b2;
}

.history-copy-btn {
    padding: 4px 8px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.history-copy-btn:hover {
    border-color: #0891b2;
    color: #0891b2;
}

.history-copy-btn.copied {
    background: #059669;
    border-color: #059669;
    color: white;
}

.history-note {
    margin-top: 12px;
    font-size: 12px;
    color: #999;
    text-align: center;
}

/* ==========================================================================
   Sparkle Effects
   ========================================================================== */
.sparkle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
}

.sparkle {
    position: absolute;
    font-size: 20px;
    opacity: 0;
    animation: sparkle 1.5s ease-out forwards;
}

@keyframes sparkle {
    0% {
        opacity: 1;
        transform: translateY(0) scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: translateY(-50px) scale(1) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0.5) rotate(360deg);
    }
}

/* ==========================================================================
   FAQ Section (Password Theme Accordion)
   ========================================================================== */
.password-faq-section {
    margin-top: 32px;
    padding: 24px 20px;
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 50%, #ecfeff 100%);
    border-radius: 20px;
    border: 2px solid #a5f3fc;
}

.password-faq-section h2 {
    text-align: center;
    color: #0891b2;
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Override base FAQ styles for password theme */
.password-faq-section .faq-list {
    gap: 12px;
}

.password-faq-section .faq-item {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.1);
    border: 1px solid #a5f3fc;
    transition: all 0.3s ease;
    overflow: hidden;
}

.password-faq-section .faq-item[open] {
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.15);
}

.password-faq-section .faq-question {
    padding: 16px 20px;
    color: #0891b2;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.password-faq-section .faq-question::after {
    border-color: #0891b2;
}

.password-faq-section .faq-question:hover {
    background: rgba(6, 182, 212, 0.05);
}

.password-faq-section .faq-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.password-faq-section .faq-answer {
    padding: 0 20px 16px;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

.password-faq-section .faq-answer p {
    margin: 0 0 12px 0;
}

.password-faq-section .faq-answer p:last-child {
    margin-bottom: 0;
}

.password-faq-section .faq-answer ul {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.password-faq-section .faq-answer ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
}

.password-faq-section .faq-answer ul li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 8px;
    width: 6px;
    height: 6px;
    background: #22d3ee;
    border-radius: 50%;
}

/* Disclaimer at bottom */
.password-disclaimer {
    margin-top: 28px;
    padding: 16px 20px;
    background: white;
    border-radius: 30px;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    line-height: 1.6;
    border: 2px dashed #a5f3fc;
}

.password-disclaimer span {
    color: #06b6d4;
}

/* ==========================================================================
   Generate Button Animation
   ========================================================================== */
.calculate-button {
    position: relative;
    overflow: hidden;
}

.calculate-button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.calculate-button:active::after {
    width: 300px;
    height: 300px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 480px) {
    .password-display {
        font-size: 1rem;
        padding: 12px 14px;
    }

    .password-display-container {
        flex-direction: column;
    }

    .copy-inline-btn {
        flex-direction: row;
        padding: 12px 16px;
    }

    .result-actions {
        flex-direction: column;
        align-items: center;
    }

    .generate-again-button,
    .share-trigger-btn {
        width: 100%;
        max-width: 240px;
        justify-content: center;
    }

    .strength-info {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }

    /* FAQ mobile */
    .password-faq-section {
        padding: 24px 16px;
        border-radius: 16px;
    }

    .password-faq-section h2 {
        font-size: 1.25rem;
    }

    .password-disclaimer {
        padding: 14px 16px;
        font-size: 0.85rem;
        border-radius: 20px;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .history-copy-btn {
        align-self: flex-end;
    }
}
