/* TechniqueHow Whats DP Viewer - clean bordered cards */
/* All selectors prefixed with .thwhatsdpd-* to avoid conflicts */

.thwhatsdpd-wrapper {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.thwhatsdpd-inner {
    padding: 12px 8px 16px;
}

.thwhatsdpd-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.thwhatsdpd-brand {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(120, 120, 120, 0.35);
    font-weight: 600;
}

/* TOOLBOX (no background color, just elements) */

.thwhatsdpd-toolbox {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.thwhatsdpd-input-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    flex-wrap: wrap;
}

.thwhatsdpd-select-wrap {
    flex: 0 0 130px;
    min-width: 110px;
}

.thwhatsdpd-input-wrap {
    flex: 1 1 220px;
    min-width: 0;
}

/* Colorful curved UI for inputs (keep stylish) */
.thwhatsdpd-country,
.thwhatsdpd-number {
    width: 100%;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.14);
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    background-color: #ffffff;
}

.thwhatsdpd-country {
    background-image: linear-gradient(#ffffff, #ffffff), linear-gradient(135deg, #ff8a00, #e52e71);
}

.thwhatsdpd-number {
    background-image: linear-gradient(#ffffff, #ffffff), linear-gradient(135deg, #1dd1a1, #54a0ff);
}

.thwhatsdpd-country:focus,
.thwhatsdpd-number:focus {
    box-shadow: 0 0 0 2px rgba(80, 200, 255, 0.4);
}

/* Download button centered below input */
.thwhatsdpd-button-row {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.thwhatsdpd-download-btn {
    padding: 10px 34px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    background-color: #0073e6;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 115, 230, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.thwhatsdpd-download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 115, 230, 0.45);
    filter: brightness(1.04);
}

.thwhatsdpd-download-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 115, 230, 0.4);
}

/* Spinner */
.thwhatsdpd-spinner {
    display: flex;
    justify-content: center;
    padding: 4px 0 0;
    min-height: 24px;
}

.thwhatsdpd-spinner-circle {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 3px solid rgba(0,0,0,0.08);
    border-top-color: #0073e6;
    border-right-color: #54a0ff;
    border-bottom-color: #1dd1a1;
    animation: thwhatsdpd-spin 0.85s linear infinite;
}

@keyframes thwhatsdpd-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error message */
.thwhatsdpd-error {
    margin-top: 4px;
    font-size: 13px;
    color: #ff4757;
    text-align: center;
}

/* RESULTS */

.thwhatsdpd-result {
    margin-top: 14px;
}

/* Main card - NO background color, only border */
.thwhatsdpd-result-card {
    border-radius: 16px;
    padding: 14px 12px 16px;
    border: 1px solid rgba(0,0,0,0.12);
    background-color: transparent;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    color: inherit;
}

/* Top row: avatar + meta */
.thwhatsdpd-top-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

/* Avatar small circle */
.thwhatsdpd-avatar {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.04);
}

.thwhatsdpd-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thwhatsdpd-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    color: #ffffff;
}

.thwhatsdpd-avatar-business {
    background: linear-gradient(135deg, #feca57, #ff9f43);
}

.thwhatsdpd-avatar-personal {
    background: linear-gradient(135deg, #ff9ff3, #f368e0);
}

/* Meta list */
.thwhatsdpd-meta-wrap {
    flex: 1 1 200px;
}

.thwhatsdpd-meta-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
}

.thwhatsdpd-meta-label {
    font-weight: 600;
    opacity: 0.9;
    display: inline-block;
    margin-right: 4px;
}

.thwhatsdpd-meta-value {
    font-weight: 500;
}

.thwhatsdpd-meta-number {
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.16);
    display: inline-block;
    font-size: 12px;
}

/* Main DP card - NO background color, only border */
.thwhatsdpd-dp-card {
    margin-top: 14px;
    border-radius: 16px;
    padding: 10px 10px 12px;
    border: 1px solid rgba(0,0,0,0.1);
    background-color: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.thwhatsdpd-dp-box {
    width: 100%;
    max-width: 400px;
    height: 400px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.14);
    background-color: rgba(0,0,0,0.02);
    display: flex;
    align-items: center;
    justify-content: center;
}

.thwhatsdpd-dp-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Placeholder for main DP when missing */
.thwhatsdpd-dp-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 120px;
    font-weight: 800;
    color: #ffffff;
    background: radial-gradient(circle at 0 0, #ff9ff3, transparent 60%),
                radial-gradient(circle at 100% 100%, #54a0ff, transparent 60%),
                linear-gradient(135deg, #ff9a9e, #fad0c4);
}

.thwhatsdpd-dp-placeholder-business {
    background: radial-gradient(circle at 0 0, #feca57, transparent 60%),
                radial-gradient(circle at 100% 100%, #ff6b6b, transparent 60%),
                linear-gradient(135deg, #ff9f43, #ff6b6b);
}

.thwhatsdpd-dp-placeholder-personal {
    background: radial-gradient(circle at 0 0, #ff9ff3, transparent 60%),
                radial-gradient(circle at 100% 100%, #54a0ff, transparent 60%),
                linear-gradient(135deg, #a6c1ee, #fbc2eb);
}

/* Download DP button - blue with white text */
.thwhatsdpd-dp-btn-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
}

.thwhatsdpd-dp-download-btn {
    padding: 8px 24px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background-color: #0073e6;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.22);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.thwhatsdpd-dp-download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.24);
    filter: brightness(1.05);
}

.thwhatsdpd-dp-download-btn:disabled,
.thwhatsdpd-dp-download-btn[disabled] {
    cursor: default;
    opacity: 0.6;
    box-shadow: none;
}

/* Responsive tweaks */
@media (max-width: 640px) {
    .thwhatsdpd-result-card {
        padding: 12px 10px 14px;
    }

    .thwhatsdpd-top-row {
        flex-direction: row;
    }

    .thwhatsdpd-avatar {
        width: 48px;
        height: 48px;
    }

    .thwhatsdpd-dp-box {
        height: 320px;
    }

    .thwhatsdpd-meta-list {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .thwhatsdpd-input-row {
        flex-direction: column;
    }

    .thwhatsdpd-select-wrap {
        flex: 1 1 100%;
    }

    .thwhatsdpd-dp-box {
        height: 260px;
    }

    .thwhatsdpd-dp-placeholder {
        font-size: 82px;
    }
}
