/**
 * Tools Specific Styles
 */

/* ===== Tool Container ===== */
.tool-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== Input Groups ===== */
.input-group-tool {
    display: flex;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.input-group-tool input {
    flex: 1;
    border: none;
    padding: 20px;
    font-size: 1.1rem;
}

.input-group-tool input:focus {
    outline: none;
}

.input-group-tool button {
    padding: 20px 40px;
    border-radius: 0;
}

/* ===== Textarea Tool ===== */
.tool-textarea {
    width: 100%;
    min-height: 200px;
    padding: 20px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-family: var(--font-primary);
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.tool-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ===== File Upload ===== */
.file-upload-zone {
    border: 3px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 50px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.file-upload-zone i {
    font-size: 4rem;
    color: var(--gray-400);
    margin-bottom: 20px;
}

.file-upload-zone h4 {
    color: var(--gray-700);
}

.file-upload-zone p {
    color: var(--gray-500);
}

/* ===== Code Editor ===== */
.code-editor {
    background: var(--gray-900);
    border-radius: var(--radius);
    overflow: hidden;
}

.code-editor-header {
    background: var(--gray-800);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.code-editor-header span {
    color: var(--gray-400);
    font-size: 0.9rem;
}

.code-editor textarea {
    width: 100%;
    min-height: 300px;
    background: transparent;
    border: none;
    color: #e5e7eb;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 14px;
    padding: 15px;
    resize: vertical;
}

.code-editor textarea:focus {
    outline: none;
}

/* ===== Result Box ===== */
.result-box {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 20px;
    border-left: 4px solid var(--primary-color);
}

.result-box.success {
    border-left-color: var(--success-color);
}

.result-box.error {
    border-left-color: var(--danger-color);
}

.result-box.warning {
    border-left-color: var(--warning-color);
}

/* ===== SEO Score Gauge ===== */
.seo-gauge {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.seo-gauge-circle {
    fill: none;
    stroke-width: 15;
}

.seo-gauge-bg {
    stroke: var(--gray-200);
}

.seo-gauge-fill {
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dashoffset 1s ease;
}

.seo-gauge-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.seo-gauge-text .score {
    font-size: 3rem;
    font-weight: 700;
    color: var(--gray-900);
}

.seo-gauge-text .label {
    font-size: 0.9rem;
    color: var(--gray-500);
}

/* ===== Keyword Table ===== */
.keyword-table {
    width: 100%;
}

.keyword-table th {
    background: var(--gray-100);
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
}

.keyword-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--gray-200);
}

.keyword-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 500;
}

.keyword-badge.high {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.keyword-badge.medium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.keyword-badge.low {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* ===== Meta Tag Preview ===== */
.meta-preview {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.meta-preview-google {
    margin-bottom: 20px;
}

.meta-preview-title {
    color: #1a0dab;
    font-size: 1.25rem;
    margin-bottom: 3px;
}

.meta-preview-url {
    color: #006621;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.meta-preview-description {
    color: #545454;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===== Link Checker ===== */
.link-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 500;
}

.link-status.valid {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.link-status.broken {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.link-status.redirect {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

/* ===== Domain Info ===== */
.domain-info-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow);
}

.domain-info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
}

.domain-info-row:last-child {
    border-bottom: none;
}

.domain-info-label {
    color: var(--gray-600);
    font-weight: 500;
}

.domain-info-value {
    color: var(--gray-900);
    font-weight: 600;
}

/* ===== Color Picker ===== */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.color-picker-preview {
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.color-picker-input {
    flex: 1;
}

.color-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.color-value-item {
    background: var(--gray-100);
    padding: 10px;
    border-radius: var(--radius);
    text-align: center;
}

.color-value-item label {
    font-size: 0.8rem;
    color: var(--gray-500);
    display: block;
    margin-bottom: 5px;
}

.color-value-item input {
    width: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 600;
}

/* ===== Calculator ===== */
.calc-display {
    background: var(--gray-900);
    color: white;
    padding: 20px;
    text-align: right;
    font-size: 2rem;
    border-radius: var(--radius);
    margin-bottom: 15px;
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.calc-btn {
    padding: 20px;
    font-size: 1.25rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.calc-btn:hover {
    transform: scale(1.05);
}

.calc-btn-number {
    background: var(--gray-100);
    color: var(--gray-900);
}

.calc-btn-operator {
    background: var(--primary-color);
    color: white;
}

.calc-btn-clear {
    background: var(--danger-color);
    color: white;
}

.calc-btn-equals {
    background: var(--success-color);
    color: white;
}

/* ===== Image Preview ===== */
.image-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.image-preview-item {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.image-preview-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.image-preview-item .info {
    padding: 10px;
}

.image-preview-item .info h6 {
    font-size: 0.9rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-preview-item .info p {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin: 0;
}

/* ===== Tabs ===== */
.tool-tabs {
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 20px;
}

.tool-tabs .nav-link {
    border: none;
    color: var(--gray-600);
    padding: 15px 25px;
    font-weight: 500;
}

.tool-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    margin-bottom: -2px;
}

/* ===== Accordion ===== */
.tool-accordion .accordion-button {
    font-weight: 500;
    color: var(--gray-900);
}

.tool-accordion .accordion-button:not(.collapsed) {
    background: rgba(37, 99, 235, 0.05);
    color: var(--primary-color);
}

/* ===== History List ===== */
.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--gray-200);
}

.history-item:hover {
    background: var(--gray-50);
}

/* ===== Copy Button ===== */
.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* ===== Response Times ===== */
.response-time {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 500;
}

.response-time.fast {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.response-time.medium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.response-time.slow {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}
