/* Custom User Pages Frontend Styles */
.cup-page-creator-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.cup-page-creator-container h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1.8rem;
    font-weight: 600;
}

.cup-current-page-info {
    background-color: #e3f2fd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cup-current-page-info p {
    margin: 0 0 10px 0;
    font-weight: 500;
    color: #1976d2;
}

.cup-page-link {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #1976d2;
    text-decoration: none;
}

.cup-page-link .dashicons {
    margin-left: 5px;
}

.cup-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.cup-field {
    margin-bottom: 0;
}

.cup-field.cup-full-width {
    grid-column: 1 / -1; /* Faz o campo ocupar toda a largura da grid */
}

.cup-field label {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: #333;
}

.cup-field.cup-field-required label {
    color: #1976d2;
}

.cup-field.cup-field-required label .required {
    color: #f44336;
    margin-left: 5px;
}

.cup-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    color: #666;
}

.cup-icon i {
    font-size: 20px;
}

.cup-input-group {
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.cup-input-group:focus-within {
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.3);
    border-color: #1976d2;
}

.cup-url-prefix {
    padding: 0.8rem 1rem;
    background-color: #f2f2f2;
    color: #666;
    border-right: 1px solid #ddd;
    font-size: 0.9rem;
    white-space: nowrap;
}

.cup-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    font-size: 1rem;
    width: 100%;
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.cup-input-group .cup-input {
    border: none;
}

.cup-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.3);
    border-color: #1976d2;
}

.cup-input-group .cup-input:focus {
    box-shadow: none;
}

.cup-input[disabled] {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.cup-hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

.cup-logo-uploader {
    margin-top: 10px;
}

.cup-logo-preview {
    width: 100%;
    position: relative;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cup-logo-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cup-remove-logo-button {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.cup-logo-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cup-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.cup-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background-color: #f5f5f5;
    border: 1px dashed #ccc;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    color: #555;
    transition: all 0.2s ease;
    width: 100%;
    margin-bottom: 8px;
}

.cup-upload-label:hover {
    background-color: #e9e9e9;
    border-color: #aaa;
}

.cup-upload-label .dashicons {
    margin-right: 10px;
}

.cup-file-input {
    opacity: 0;
    position: absolute;
    z-index: -1;
    width: 0.1px;
    height: 0.1px;
}

.cup-hidden {
    display: none;
}

.cup-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
}

.cup-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #1976d2;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cup-button:hover {
    background-color: #1565c0;
    color: #fff;
    transform: translateY(-2px);
}

.cup-button:active {
    transform: translateY(0);
}

.cup-button .cup-icon {
    color: white;
    margin-right: 8px;
}

.cup-button .cup-icon i {
    font-size: 18px;
}

.cup-spinner {
    display: none;
    width: 20px;
    height: 20px;
    margin-left: 1rem;
    border: 2px solid rgba(25, 118, 210, 0.2);
    border-top-color: #1976d2;
    border-radius: 50%;
    animation: cup-spin 0.8s linear infinite;
}

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

.cup-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.cup-error {
    background-color: #ffebee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

.cup-success {
    background-color: #e8f5e9;
    color: #388e3c;
    border: 1px solid #c8e6c9;
}

.cup-info {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.cup-user-name {
    font-weight: 600;
    color: #333;
}

.cup-whatsapp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.cup-whatsapp-button:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.cup-whatsapp-icon {
    width: 30px;
    height: 30px;
    fill: #fff;
}

/* Spinner overlay para upload */
.cup-upload-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cup-upload-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cup-upload-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cup-spin 1s linear infinite;
}

.cup-upload-spinner-text {
    color: white;
    margin-top: 15px;
    font-size: 16px;
}

/* Ícones de redes sociais */
.cup-social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background: transparent;
    padding: 10px;
    justify-content: center;
}

.cup-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    transition: transform 0.3s ease;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.cup-social-icon:hover {
    transform: scale(1.15);
}

.cup-social-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.cup-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.cup-whatsapp {
    background-color: #25D366;
}

.cup-tiktok {
    background-color: #000000;
}

.cup-kwai {
    background-color: #FF7500;
}

.cup-website {
    background-color: #1976d2;
}

.cup-youtube {
    background-color: #FF0000;
}

.cup-facebook {
    background-color: #1877F2;
}

.cup-pinterest {
    background-color: #E60023;
}

.cup-linkedin {
    background-color: #0077B5;
}

.cup-twitter {
    background-color: #1DA1F2;
}

.cup-reddit {
    background-color: #FF4500;
}

.cup-googledrive {
    background-color: #0F9D58;
}

.cup-telegram {
    background-color: #26A5E4;
}

/* User logo */
.cup-user-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    margin: 20px 0;
}

.cup-user-logo img {
    max-width: 100%;
    height: auto;
}

/* Configurações de Visibilidade dos Ícones */
.cup-social-icons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.cup-icon-visibility {
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
    margin-bottom: 5px;
}

.cup-icon-visibility label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.cup-icon-visibility input[type="checkbox"] {
    margin-right: 8px;
}

/* Responsivo */
@media (max-width: 768px) {
    .cup-page-creator-container {
        padding: 1.5rem 0.5rem;
        margin: 1rem 0;
        width: 100%;
        border-radius: 0;
        box-shadow: none;
    }
    
    .cup-form-grid {
        grid-template-columns: 1fr;
    }
    
    .cup-url-prefix {
        font-size: 0.8rem;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .cup-button {
        width: 100%;
    }
    
    .cup-social-icons {
        gap: 10px;
    }
    
    .cup-social-icons-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}