/**
 * ConvMaster - Hash Generator Styles v2.0
 * 
 * @package    ConvMaster
 * @version    2.0.0
 */

/* =====================================================
   TOOL PAGE LAYOUT
   ===================================================== */
.tool-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tool-header__icon {
    font-size: 2.5rem;
}

.tool-header__icon .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
}

.tool-header__icon .icon--purple {
    background: rgba(139, 92, 246, 0.15);
}

.tool-header__text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}

.tool-header__text p {
    margin: 0;
    color: var(--text-secondary);
}

/* =====================================================
   HASH GENERATOR WIDGET
   ===================================================== */
.hash-generator {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* =====================================================
   MODE TABS
   ===================================================== */
.hash-generator__tabs {
    display: flex;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.hash-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.hash-tab:hover {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.05);
}

.hash-tab--active {
    color: #8b5cf6;
    background: var(--bg-card);
}

.hash-tab--active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #8b5cf6;
}

.hash-tab__icon {
    font-size: 1.25rem;
}

/* =====================================================
   GENERATOR CONTENT
   ===================================================== */
.hash-generator__content {
    padding: 1.5rem;
}

.hash-generator__content[hidden] {
    display: none !important;
}

.hash-generator__workspace {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* =====================================================
   TEXT INPUT
   ===================================================== */
.hash-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hash-input label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.hash-input__textarea {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.2s ease;
}

.hash-input__textarea:focus {
    outline: none;
    border-color: #8b5cf6;
}

.hash-input__textarea::placeholder {
    color: var(--text-muted);
}

.hash-input__info {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* =====================================================
   OPTIONS
   ===================================================== */
.hash-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hash-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.hash-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.hash-option__check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.hash-option__check::after {
    content: '✓';
    font-size: 0.75rem;
    color: white;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.hash-option input:checked + .hash-option__check {
    background: #8b5cf6;
    border-color: #8b5cf6;
}

.hash-option input:checked + .hash-option__check::after {
    opacity: 1;
    transform: scale(1);
}

.hash-option__label {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* =====================================================
   RESULTS SECTION
   ===================================================== */
.hash-results {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.hash-results[hidden] {
    display: none !important;
}

.hash-results__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.hash-results__header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* =====================================================
   HASH CATEGORIES
   ===================================================== */
.hash-category {
    margin-bottom: 1rem;
}

.hash-category:last-child {
    margin-bottom: 0;
}

.hash-category__title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #8b5cf6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 0.5rem;
    padding: 0.25rem 0.5rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: var(--radius-sm);
    display: inline-block;
}

.hash-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* =====================================================
   HASH ROW
   ===================================================== */
.hash-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.hash-row__label {
    flex-shrink: 0;
    min-width: 90px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.hash-row__value {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    min-width: 0;
}

.hash-row__value:focus {
    outline: none;
    border-color: #8b5cf6;
}

.hash-row__copy {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.hash-row__copy:hover {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.hash-row__copy--copied {
    background: rgba(34, 197, 94, 0.1) !important;
    color: #22c55e !important;
}

/* =====================================================
   DROPZONE (File Mode)
   ===================================================== */
.hash-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    background: var(--bg-tertiary);
    transition: all 0.2s ease;
    cursor: pointer;
}

.hash-dropzone:hover,
.hash-dropzone--active {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.05);
}

.hash-dropzone__content svg {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.hash-dropzone__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.hash-dropzone__subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 1rem;
}

/* =====================================================
   FILE INFO
   ===================================================== */
.hash-file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.hash-file-info[hidden] {
    display: none !important;
}

.hash-file-info__icon {
    font-size: 2rem;
}

.hash-file-info__details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hash-file-info__name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
}

.hash-file-info__size {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.hash-file-info__remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.hash-file-info__remove:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* =====================================================
   PROGRESS BAR
   ===================================================== */
.hash-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hash-progress[hidden] {
    display: none !important;
}

.hash-progress__bar {
    flex: 1;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.hash-progress__fill {
    height: 100%;
    width: 0;
    background: #8b5cf6;
    border-radius: 4px;
    transition: width 0.2s ease;
}

.hash-progress__text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 40px;
    text-align: right;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn--primary {
    background: #8b5cf6;
    color: white;
}

.btn--primary:hover {
    background: #7c3aed;
    transform: translateY(-1px);
}

.btn--secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn--secondary:hover {
    background: var(--bg-secondary);
    border-color: #8b5cf6;
}

.btn--small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn--large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn--success {
    background: #22c55e !important;
    border-color: #22c55e !important;
    color: white !important;
}

.btn svg {
    flex-shrink: 0;
}

.btn[hidden] {
    display: none !important;
}

/* =====================================================
   PRIVACY NOTICE
   ===================================================== */
.hash-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(139, 92, 246, 0.1);
    border-top: 1px solid var(--border-color);
}

.hash-privacy span {
    font-size: 1rem;
}

.hash-privacy p {
    font-size: 0.85rem;
    color: #8b5cf6;
    margin: 0;
}

/* =====================================================
   SEO CONTENT
   ===================================================== */
.tool-content {
    margin-top: 3rem;
}

.tool-section {
    margin-bottom: 2.5rem;
}

.tool-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.tool-section p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
}

.feature-card__icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Algorithms Grid */
.algorithms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.algorithm-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.algorithm-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.algorithm-card__name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.algorithm-card__badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
}

.algorithm-card__badge--legacy {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.algorithm-card__badge--secure {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.algorithm-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.step-card__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #8b5cf6;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 0.75rem;
}

.step-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.step-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Use Cases Grid */
.usecases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.usecase-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.usecase-card__icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.usecase-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.375rem;
}

.usecase-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.faq-item summary {
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--text-muted);
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item p {
    padding: 0 1.5rem 1rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* =====================================================
   HIDDEN ELEMENTS
   ===================================================== */
[hidden] {
    display: none !important;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 640px) {
    .hash-row {
        flex-wrap: wrap;
    }
    
    .hash-row__label {
        min-width: 100%;
        margin-bottom: 0.25rem;
    }
    
    .hash-row__value {
        font-size: 0.75rem;
    }
    
    .hash-tab__name {
        font-size: 0.85rem;
    }
    
    .hash-generator__content {
        padding: 1rem;
    }
    
    .hash-results {
        padding: 1rem;
    }
    
    .hash-options {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hash-file-info {
        flex-wrap: wrap;
    }
    
    .btn--large {
        width: 100%;
    }
    
    .hash-results__header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
}

/* =====================================================
   LIGHT THEME ADJUSTMENTS
   ===================================================== */
[data-theme="light"] .hash-input__textarea {
    background: var(--bg-primary);
}

[data-theme="light"] .hash-results {
    background: var(--bg-secondary);
}

[data-theme="light"] .hash-row {
    background: var(--bg-primary);
}

[data-theme="light"] .hash-row__value {
    background: white;
}

[data-theme="light"] .hash-dropzone {
    background: var(--bg-secondary);
}

[data-theme="light"] .hash-file-info {
    background: var(--bg-secondary);
}
