/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* ===================== */
/* WOOCOMMERCE PRODUCT PAGE OVERRIDES */
/* ===================== */

/* Hide related products section */
.woocommerce .related.products,
.related.products {
    display: none !important;
}

/* Hide product tabs (description, reviews, etc.) */
.woocommerce-tabs,
.woocommerce div.product .woocommerce-tabs {
    display: none !important;
}

/* Hide product meta (SKU, categories, tags) */
.product_meta,
.woocommerce div.product .product_meta {
    display: none !important;
}

/* ===================== */
/* WOOCOMMERCE MY ACCOUNT MENU */
/* ===================== */

/* Title case for My Account navigation menu items */
.woocommerce-MyAccount-navigation-link a {
    text-transform: capitalize;
}

/* ===================== */
/* ACCOUNT FORM FIELDS */
/* ===================== */

/* Fieldset styling */
.ccp-account-fields {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px 25px 25px;
    margin: 30px 0;
    background: #fafafa;
}

.ccp-account-fields legend {
    font-size: 1.1em;
    font-weight: 600;
    padding: 0 10px;
    margin-left: -10px;
    color: #333;
}

/* Logo field */
.ccp-logo-field .ccp-logo-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ccp-logo-preview {
    width: 120px;
    height: 120px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.ccp-logo-preview:hover {
    border-color: #0073aa;
    background-color: #f8fafc;
}

.ccp-logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ccp-logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #888;
    text-align: center;
    font-size: 0.85em;
}

.ccp-logo-placeholder svg {
    opacity: 0.5;
}

/* Loading spinner */
.ccp-logo-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.ccp-spinner {
    animation: ccp-spin 1s linear infinite;
    color: #0073aa;
}

@keyframes ccp-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.ccp-logo-actions {
    display: flex;
    gap: 8px;
}

.ccp-logo-actions .button {
    font-size: 0.9em;
    padding: 6px 12px;
}

.ccp-remove-logo-btn {
    background: #fff !important;
    color: #a00 !important;
    border-color: #a00 !important;
}

.ccp-remove-logo-btn:hover {
    background: #a00 !important;
    color: #fff !important;
    border-color: #a00 !important;
}

.ccp-logo-hint {
    font-size: 0.85em;
    color: #666;
    font-style: italic;
}

/* Hidden utility class */
.ccp-account-fields .hidden {
    display: none !important;
}

/* Field error states */
.ccp-field-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 1px #dc3545 !important;
}

.ccp-error-message {
    display: block;
    color: #dc3545;
    font-size: 0.85em;
    margin-top: 5px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .ccp-account-fields {
        padding: 15px 18px 20px;
    }

    .ccp-logo-preview {
        width: 100px;
        height: 100px;
    }

    .ccp-logo-actions {
        flex-direction: column;
    }
}