/*
Theme Name: Dvaks Theme
Theme URI: https://dvaks.com
Author: Dvaks
Author URI: https://dvaks.com
Description: Modern Apple-inspired theme for selling guest post links with WooCommerce
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dvaks-theme
Tags: woocommerce, modern, clean, minimal
*/

/* ===========================
   Apple Design System Variables
   =========================== */
:root {
    --primary-color: #0071e3;
    --secondary-color: #0077ed;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --background: #ffffff;
    --background-secondary: #f5f5f7;
    --border-color: rgba(0, 0, 0, 0.1);
    --success-color: #34c759;
    --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --border-radius: 18px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.28, 0.11, 0.32, 1);
}

/* ===========================
   Global Reset & Base Styles
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-system);
    font-size: 17px;
    line-height: 1.47059;
    font-weight: 400;
    letter-spacing: -0.022em;
    color: var(--text-primary);
    background-color: #fbfbfd;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    opacity: 0.8;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===========================
   Typography
   =========================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.005em;
    line-height: 1.1;
    margin-bottom: 0.8em;
}

h1 {
    font-size: 56px;
    font-weight: 600;
    letter-spacing: -0.015em;
}

h2 {
    font-size: 48px;
    font-weight: 600;
}

h3 {
    font-size: 32px;
    font-weight: 600;
}

p {
    margin-bottom: 1em;
}

/* ===========================
   Layout
   =========================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 22px;
}

.site-content {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

/* ===========================
   Buttons
   =========================== */
.button,
button,
input[type="submit"],
.add-to-cart-button {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 980px;
    font-size: 17px;
    font-weight: 400;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.button:hover,
button:hover,
input[type="submit"]:hover,
.add-to-cart-button:hover {
    background: var(--secondary-color);
    opacity: 0.9;
    color: white;
}

/* Added/In Cart State */
.add-to-cart-button.added,
.add-to-cart-button.in-cart {
    background: var(--success-color);
    color: white;
    pointer-events: none;
}

.add-to-cart-button.loading {
    opacity: 0.6;
    cursor: wait;
}

/* ===========================
   Cards & Tables
   =========================== */
.card {
    background: var(--background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 24px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

/* ===========================
   Utility Classes
   =========================== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ===========================
   Ahrefs Traffic Tooltip
   =========================== */
.ahrefs-traffic-hover {
    position: relative;
    cursor: pointer;
}

.traffic-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
    min-width: 400px;
    max-width: 450px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateX(-50%) translateY(10px);
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ahrefs-traffic-hover:hover .traffic-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.tooltip-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.tooltip-header-left {
    flex: 1;
}

.tooltip-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    text-align: left;
}

.tooltip-subtitle {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
    text-align: left;
}

.ahrefs-logo {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.tooltip-traffic-value {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    text-align: right;
}

.tooltip-content {
    padding: 16px 20px;
}

.tooltip-graph-section {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.tooltip-graph-container {
    flex: 1;
}

.tooltip-graph-title {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    text-align: left;
}

.tooltip-graph {
    width: 200px;
    height: 80px;
}

.traffic-chart {
    width: 100%;
    height: 100%;
}

.chart-label {
    font-size: 10px;
    fill: #666;
    text-anchor: middle;
}

.chart-y-label {
    font-size: 10px;
    fill: #666;
    text-anchor: end;
}

.traffic-line {
    stroke: #3b82f6;
    stroke-width: 2;
    fill: none;
}

.traffic-area {
    fill: url(#trafficGradient);
}

.tooltip-country-breakdown {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 120px;
}

.country-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
}

.country-percentage {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    min-width: 35px;
    text-align: right;
}

.country-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    flex: 1;
}

.country-flag {
    font-size: 16px;
    line-height: 1;
}

.tooltip-footer {
    padding: 12px 20px 16px;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.tooltip-link {
    color: #007bff;
    text-decoration: none;
}

.tooltip-link:hover {
    text-decoration: underline;
}

/* Tooltip arrow */
.traffic-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .traffic-tooltip {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        min-width: 320px;
        max-width: calc(100vw - 40px);
    }
    
    .tooltip-graph-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .tooltip-graph {
        width: 100%;
        max-width: 250px;
    }
    
    .tooltip-country-breakdown {
        min-width: auto;
    }
    
    .country-item {
        padding: 3px 0;
    }
    
    .country-percentage,
    .country-name {
        font-size: 13px;
    }
    
    .tooltip-footer {
        font-size: 11px;
    }
}

