/* Coeur de Texte Plugin - Main CSS */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&family=Parisienne&display=swap');

.coeur-de-texte-container {
    max-width: 980px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff9fb;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(255, 105, 180, 0.15);
    font-family: 'Montserrat', sans-serif;
    color: #4a4a4a;
    position: relative;
    overflow: hidden;
}

.coeur-de-texte-container::before,
.coeur-de-texte-container::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffcce0"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.08;
    z-index: 0;
}

.coeur-de-texte-container::before {
    top: -50px;
    left: -50px;
    transform: rotate(-25deg);
}

.coeur-de-texte-container::after {
    bottom: -50px;
    right: -50px;
    transform: rotate(25deg);
}

.coeur-de-texte-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.coeur-de-texte-header h2 {
    font-family: 'Parisienne', cursive;
    font-size: 2.5rem;
    color: #e83e8c;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 3px rgba(232, 62, 140, 0.2);
}

.heart-icon {
    color: #ff6b9c;
    display: inline-block;
    transform-origin: center;
    animation: heartbeat 1.5s infinite alternate ease-in-out;
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.2);
    }
}

.subtitle {
    font-size: 1rem;
    color: #7d7d7d;
    margin-top: 0;
}

.coeur-de-texte-form-container {
    position: relative;
    z-index: 1;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #ffe6f0;
}

.form-row {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
}

.form-col {
    flex: 1;
    min-width: 0;
    padding: 0 10px;
}

.form-col-half {
    flex: 0 0 50%;
    max-width: 50%;
}

@media (max-width: 768px) {
    .form-col-half {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

label .required {
    color: #e83e8c;
}

input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ffe0ee;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #ff6b9c;
    box-shadow: 0 0 0 3px rgba(255, 107, 156, 0.2);
}

textarea {
    resize: vertical;
}

input[type="color"] {
    width: 50px;
    height: 50px;
    padding: 2px;
    border: 1px solid #ffe0ee;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    vertical-align: middle;
}

.color-name {
    display: inline-block;
    margin-left: 10px;
    font-size: 0.9rem;
    color: #888;
}

input[type="range"] {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    background: #ffe0ee;
    border-radius: 5px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #ff6b9c;
    border-radius: 50%;
    cursor: pointer;
}

.font-size-value {
    display: block;
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #888;
}

.checkbox-col {
    display: flex;
    align-items: center;
}

.checkbox-col input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

.checkbox-col label {
    margin-bottom: 0;
    cursor: pointer;
}

.coeur-submit-btn,
.coeur-btn {
    background-color: #e83e8c;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 0.75rem 2rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.coeur-submit-btn {
    width: 100%;
    padding: 1rem;
}

.coeur-submit-btn:hover,
.coeur-btn:hover {
    background-color: #d3287a;
    transform: translateY(-2px);
}

.coeur-submit-btn:active,
.coeur-btn:active {
    transform: translateY(0);
}

.coeur-de-texte-result {
    text-align: center;
    position: relative;
    z-index: 1;
}

.coeur-de-texte-result h3 {
    font-family: 'Parisienne', cursive;
    font-size: 1.8rem;
    color: #e83e8c;
    margin-bottom: 1.5rem;
}

.result-image-container {
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(232, 62, 140, 0.2);
    background-color: white;
}

.result-image-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

.result-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.download-btn {
    background-color: #4caf50;
}

.download-btn:hover {
    background-color: #3d8b40;
}

.share-buttons {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    background-color: #f8f8f8;
    color: #555;
    border: 1px solid #ffe0ee;
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-btn .heart-icon {
    font-size: 0.8rem;
    margin-right: 0.3rem;
}

.share-fb {
    background-color: #3b5998;
    color: white;
    border-color: #3b5998;
}

.share-fb:hover {
    background-color: #2d4373;
}

.share-twitter {
    background-color: #1da1f2;
    color: white;
    border-color: #1da1f2;
}

.share-twitter:hover {
    background-color: #0c85d0;
}

.coeur-de-texte-loading {
    text-align: center;
    padding: 3rem 0;
    position: relative;
    z-index: 1;
}

.heart-loader {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

.heart-loader:before,
.heart-loader:after {
    content: "";
    position: absolute;
    top: 0;
    width: 40px;
    height: 60px;
    background-color: #ff6b9c;
    border-radius: 40px 40px 0 0;
    transform: rotate(-45deg);
    transform-origin: 0 100%;
    animation: pulsate 1.2s infinite;
}

.heart-loader:after {
    left: 40px;
    transform: rotate(45deg);
    transform-origin: 100% 100%;
}

@keyframes pulsate {
    0% {
        transform: rotate(-45deg) scale(0.8);
    }
    5%, 50% {
        transform: rotate(-45deg) scale(1);
    }
    100% {
        transform: rotate(-45deg) scale(0.8);
    }
}

.heart-loader:after {
    animation-delay: 0.3s;
}

.coeur-de-texte-error {
    text-align: center;
    padding: 2rem;
    color: #e74c3c;
    position: relative;
    z-index: 1;
}

.error-details {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f9f2f4;
    border-radius: 5px;
    text-align: left;
    font-family: monospace;
    white-space: pre-wrap;
    font-size: 0.9rem;
    color: #666;
    max-height: 200px;
    overflow-y: auto;
}

.error-details-btn {
    margin-top: 1rem;
    background-color: #f8f8f8;
    color: #666;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}
