/* SHA256 Tool Wrapper */
.sha256-tool-wrapper {
    margin-bottom: 2rem;
}

/* Tool Card */
.tool-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Two Column Layout */
.tool-card-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 600px;
}

/* Panel Styles */
.input-panel,
.output-panel {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.input-panel {
    border-right: 1px solid #e5e7eb;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.panel-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.input-actions,
.output-actions {
    display: flex;
    gap: 0.5rem;
}

/* Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
}

.btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-copy {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

.btn-copy:hover:not(:disabled) {
    background: #2563eb;
    border-color: #2563eb;
}

.btn-copy.copied {
    background: #10b981;
    border-color: #10b981;
}

.btn-clear {
    color: #6b7280;
}

.btn-clear:hover:not(:disabled) {
    color: #ef4444;
    border-color: #ef4444;
}

.icon-copy,
.icon-clear {
    display: inline-block;
    width: 16px;
    height: 16px;
}

.icon-clear::before {
    content: '×';
    font-size: 20px;
    line-height: 1;
}

/* Input Group */
.input-group {
    margin-bottom: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.hash-input {
    width: 100%;
    min-height: 200px;
    flex: 1;
    padding: 0.875rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9375rem;
    
    line-height: 1.6;
    resize: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
    color: #111827;
}

.hash-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.hash-input::placeholder {
    color: #9ca3af;
}

.input-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.char-count {
    font-size: 0.75rem;
    color: #6b7280;
}

/* File Upload Section */
.file-upload-section {
    flex-shrink: 0;
}

.upload-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #9ca3af;
    font-size: 0.875rem;
}

.upload-divider::before,
.upload-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.upload-divider span {
    padding: 0 1rem;
}

.file-dropzone {
    position: relative;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.file-dropzone:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.file-dropzone.dragover {
    border-color: #3b82f6;
    background: #dbeafe;
    border-style: solid;
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.dropzone-content {
    pointer-events: none;
}

.upload-icon {
    color: #6b7280;
    margin: 0 auto 0.75rem;
    display: block;
}

.file-dropzone:hover .upload-icon,
.file-dropzone.dragover .upload-icon {
    color: #3b82f6;
}

.dropzone-text {
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    margin: 0 0 0.25rem;
}

.dropzone-hint {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

/* File List */
.file-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 0.875rem;
}

.file-name {
    color: #374151;
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    color: #6b7280;
    margin-left: 0.5rem;
    font-size: 0.8125rem;
}

/* Output Group */
.output-group {
    margin-top: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hash-display {
    min-height: 200px;
    flex: 1;
    padding: 1rem;
    background: #1f2937;
    border: 2px solid #374151;
    border-radius: 8px;
    
    font-size: 0.875rem;
    line-height: 1.6;
    color: #10b981;
    word-break: break-all;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    position: relative;
    overflow-y: auto;
}

.hash-display:empty::before {
    content: '';
}

.hash-display .placeholder-text {
    color: #6b7280;
    font-style: italic;
}

.hash-display.has-content .placeholder-text {
    display: none;
}

.output-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.hash-info {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.info-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-color: #d1d5db;
}

.info-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    border-radius: 10px;
    color: #3b82f6;
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.75rem;
}

.info-card p {
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card li {
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.8;
    padding-left: 1.5rem;
    position: relative;
}

.info-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #3b82f6;
    font-weight: bold;
}

/* Tablet Responsive */
@media (max-width: 1024px) and (min-width: 768px) {
    .tool-card-columns {
        min-height: 500px;
    }

    .hash-input {
        min-height: 180px;
    }

    .hash-display {
        min-height: 180px;
    }
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .tool-card {
        border-radius: 12px;
    }

    .tool-card-columns {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .input-panel {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .input-panel,
    .output-panel {
        padding: 1rem;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .input-actions,
    .output-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .hash-input {
        min-height: 120px;
        font-size: 0.875rem;
    }

    .hash-display {
        min-height: 100px;
        font-size: 0.8125rem;
        padding: 0.875rem;
    }

    .file-dropzone {
        padding: 2rem 1rem;
    }

    .info-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .info-card {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .sha256-tool-wrapper {
        margin-top: 1.5rem;
        margin-bottom: 2rem;
    }

    .btn-action {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .panel-title {
        font-size: 1.125rem;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .tool-card,
    .info-card {
        background: #1f2937;
        border-color: #374151;
    }

    .panel-title {
        color: #f9fafb;
    }

    .hash-input {
        background: #111827;
        border-color: #4b5563;
        color: #f9fafb;
    }

    .hash-display {
        background: #0f172a;
        border-color: #1e293b;
    }

    .btn-action {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }

    .file-dropzone {
        background: #111827;
        border-color: #4b5563;
    }
}
