/**
 * ACF for Blocks - Frontend Styles for Shortcodes
 */

/* Shortcode wrapper */
.acf-shortcode-wrapper {
    display: inline;
    line-height: inherit;
}

/* Basic field styling */
.acf-field-text,
.acf-field-textarea,
.acf-field-number,
.acf-field-email,
.acf-field-url,
.acf-field-password {
    display: inline;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

/* Price and currency styling */
.acf-field-price,
.acf-field-currency {
    font-weight: 600;
    color: #2c5530;
}

/* Date styling */
.acf-field-date,
.acf-field-datetime {
    font-variant-numeric: tabular-nums;
}

/* Link styling */
.acf-field-link a {
    color: #0073aa;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.acf-field-link a:hover {
    color: #005a87;
}

.acf-field-link a:visited {
    color: #4c2c92;
}

/* Email styling */
.acf-field-email a {
    color: #0073aa;
    text-decoration: none;
    border-bottom: 1px dotted;
}

.acf-field-email a:hover {
    text-decoration: underline;
    border-bottom: none;
}

/* Phone styling */
.acf-field-phone a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.acf-field-phone a:hover {
    text-decoration: underline;
}

/* Image styling */
.acf-field-image img {
    max-width: 100%;
    height: auto;
    display: inline-block;
    vertical-align: middle;
}

.acf-field-thumbnail img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* List styling */
.acf-field-list ul {
    margin: 0;
    padding-left: 1.5em;
    display: inline-block;
}

.acf-field-list li {
    margin: 0.25em 0;
}

/* Comma list styling */
.acf-field-comma-list {
    display: inline;
}

/* Text formatting */
.acf-field-uppercase {
    text-transform: uppercase;
}

.acf-field-lowercase {
    text-transform: lowercase;
}

.acf-field-capitalize {
    text-transform: capitalize;
}

/* Error states */
.acf-shortcode-error {
    color: #dc3232;
    font-style: italic;
    font-size: 0.9em;
}

/* Loading state */
.acf-shortcode-loading {
    color: #666;
    font-style: italic;
}

/* Legacy styles for backward compatibility */
.acf-thumbnail {
    max-width: 150px;
    height: auto;
    border-radius: 4px;
}

.acf-list {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.acf-list li {
    margin-bottom: 0.25rem;
}

.acf-currency,
.acf-price {
    font-weight: bold;
    color: #0073aa;
}

.acf-email a,
.acf-phone a {
    color: inherit;
    text-decoration: underline;
}

.acf-email a:hover,
.acf-phone a:hover {
    text-decoration: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .acf-field-thumbnail img {
        max-width: 100px;
        max-height: 100px;
    }
    
    .acf-field-list ul {
        padding-left: 1em;
    }
    
    .acf-thumbnail {
        max-width: 100px;
    }
}

/* Accessibility */
.acf-field-link a:focus,
.acf-field-email a:focus,
.acf-field-phone a:focus {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .acf-field-price,
    .acf-field-currency {
        color: #7fb069;
    }
    
    .acf-field-link a,
    .acf-field-email a,
    .acf-field-phone a {
        color: #4fc3f7;
    }
    
    .acf-field-link a:hover,
    .acf-field-email a:hover,
    .acf-field-phone a:hover {
        color: #29b6f6;
    }
    
    .acf-shortcode-error {
        color: #ff6b6b;
    }
}

/* ACF Placeholder Styles */
.acf-placeholder {
    border: 2px dashed #cccccc;
    border-radius: 4px;
    display: inline-block;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.acf-placeholder:hover {
    border-color: #999;
    background: #f0f0f0;
}

.acf-image.acf-placeholder {
    max-width: 100%;
    height: auto;
}

.acf-thumbnail.acf-placeholder {
    max-width: 150px;
    max-height: 150px;
}

/* Editor specific styles */
.block-editor .acf-placeholder {
    opacity: 0.8;
}

.block-editor .acf-placeholder::after {
    content: " (Preview)";
    font-size: 12px;
    color: #666;
    font-style: italic;
}
