/* WordPress Hash App - full-width card, left inputs / right result */
.wphash-app {
    margin-bottom: 2rem;
}

.wphash-card {
    background: var(--bs-body-bg, #fff);
    border-radius: 16px;
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 1.25rem;
    width: 100%;
}

@media (min-width: 576px) {
    .wphash-card {
        padding: 1.75rem;
    }
}

.wphash-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .wphash-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        align-items: stretch;
    }
}

.wphash-left {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.wphash-right {
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

@media (min-width: 768px) {
    .wphash-right {
        border-left: 1px solid var(--border-color, #dee2e6);
        padding-left: 2rem;
    }
}

.wphash-input-block {
    margin-bottom: 1rem;
}

.wphash-label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--bs-body-color, #1a1a1a);
    margin-bottom: 0.5rem;
}

.wphash-password-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
}

.wphash-input {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 3rem 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--bs-body-color, #1a1a1a);
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--border-color, #ced4da);
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.wphash-input::placeholder {
    color: var(--text-muted, #6c757d);
}

.wphash-input:hover {
    border-color: var(--border-hover, #adb5bd);
}

.wphash-input:focus {
    outline: none;
    border-color: var(--focus-color, #0d6efd);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.wphash-toggle {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 0 10px 10px 0;
    color: var(--text-muted, #6c757d);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.wphash-toggle:hover {
    color: var(--bs-body-color, #1a1a1a);
    background: rgba(0, 0, 0, 0.04);
}

.wphash-toggle:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--focus-color, #0d6efd);
}

.wphash-toggle-icon {
    width: 20px;
    height: 20px;
    display: block;
    background: currentColor;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.wphash-toggle-show {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

.wphash-toggle-hide {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}

.wphash-toggle[aria-pressed="true"] .wphash-toggle-show {
    display: none;
}

.wphash-toggle[aria-pressed="false"] .wphash-toggle-hide {
    display: none;
}

.wphash-hint {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted, #6c757d);
    margin-top: 0.375rem;
}

.wphash-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
}

.wphash-divider::before,
.wphash-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-color, #dee2e6);
}

.wphash-divider span {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted, #6c757d);
    text-transform: lowercase;
}

.wphash-file-block {
    margin-bottom: 1.25rem;
}

.wphash-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 100px;
    padding: 1rem;
    border: 2px dashed var(--border-color, #dee2e6);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.02);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.wphash-dropzone:hover,
.wphash-dropzone:focus-visible {
    border-color: var(--focus-color, #0d6efd);
    background: rgba(13, 110, 253, 0.04);
    outline: none;
}

.wphash-dropzone.dragover {
    border-color: var(--focus-color, #0d6efd);
    background: rgba(13, 110, 253, 0.08);
}

.wphash-file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.wphash-dropzone-icon {
    width: 32px;
    height: 32px;
    background: var(--text-muted, #6c757d);
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.wphash-dropzone-text {
    font-size: 0.9375rem;
    color: var(--text-muted, #6c757d);
}

.wphash-actions {
    margin-bottom: 0;
    margin-top: 0.25rem;
}

.wphash-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
    border: none;
    width: 100%;
}

@media (min-width: 400px) {
    .wphash-btn {
        width: auto;
        min-width: 200px;
    }
}

.wphash-btn:active {
    transform: scale(0.98);
}

.wphash-btn-primary {
    background: linear-gradient(180deg, #0d6efd 0%, #0a58ca 100%);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.wphash-btn-primary:hover {
    background: linear-gradient(180deg, #0a58ca 0%, #084298 100%);
    color: #fff;
}

.wphash-btn-primary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.4);
}

.wphash-btn-copy {
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #1a1a1a);
    border: 1px solid var(--border-color, #ced4da);
    font-size: 0.875rem;
    min-height: 36px;
    padding: 0.5rem 1rem;
}

.wphash-btn-copy:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: var(--border-hover, #adb5bd);
}

.wphash-btn-copy:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--focus-color, #0d6efd);
}

.wphash-btn-copy:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wphash-btn-copy.copied {
    background: rgba(25, 135, 84, 0.12);
    border-color: #198754;
    color: #198754;
}

.wphash-output-block {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.wphash-output-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.wphash-output-head .wphash-btn-copy {
    flex-shrink: 0;
}

.wphash-output {
    display: block;
    width: 100%;
    min-height: 120px;
    flex: 1;
    padding: 1rem;
    
    font-size: 0.875rem;
    line-height: 1.5;
    word-break: break-all;
    white-space: pre-wrap;
    color: #0f5132;
    background: rgba(13, 110, 253, 0.06);
    border: 1px solid rgba(13, 110, 253, 0.2);
    border-radius: 10px;
}

.wphash-output-placeholder {
    font-size: 0.9375rem;
    color: var(--text-muted, #6c757d);
    padding: 1.5rem 1rem;
    text-align: center;
    border: 1px dashed var(--border-color, #dee2e6);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.02);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

.wphash-right .wphash-output-block[hidden] ~ .wphash-output-placeholder {
    display: flex;
}

.wphash-right .wphash-output-block:not([hidden]) ~ .wphash-output-placeholder {
    display: none;
}
