/**
 * Public styles for the event registration form
 */

.event-registration-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: inherit;
}

.event-registration-form {
    background: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.event-registration-form h2 {
    margin-bottom: 20px;
    text-align: center;
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="number"],
.form-row textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 16px;
}

.form-row input[type="checkbox"] {
    margin-right: 10px;
}

.form-row .checkbox-container {
    display: flex;
    align-items: center;
}

.form-row .checkbox-label {
    font-weight: normal;
    margin-bottom: 0;
}

.childcare-fields {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-top: 10px;
    border-left: 3px solid #2271b1;
}

.form-submit {
    text-align: center;
    margin-top: 30px;
}

.form-submit input[type="submit"] {
    background-color: #2271b1;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.form-submit input[type="submit"]:hover {
    background-color: #135e96;
}

.form-submit input[type="submit"]:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.form-error {
    background-color: #ffeeee;
    color: #cc0000;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #cc0000;
}

.form-success {
    background-color: #eeffee;
    color: #006600;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #006600;
}

/* Mobile responsive design */
@media screen and (max-width: 768px) {
    .event-registration-form {
        padding: 20px 15px;
    }
    
    .form-submit input[type="submit"] {
        width: 100%;
    }
}

/* Divi Theme compatibility */
.et_pb_module .event-registration-form-container {
    width: 100%;
}

.et_pb_module .event-registration-form {
    box-shadow: none;
    padding: 0;
}

.et_pb_module .form-error,
.et_pb_module .form-success {
    margin-bottom: 20px;
}

/* Tooltip and Error Handling Styles */
.form-row {
    position: relative;
}

.tooltip {
    display: none;
    position: absolute;
    background-color: #cc0000;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 100;
    top: calc(100% - 5px);
    left: 10px;
    width: calc(100% - 20px);
    box-sizing: border-box;
    animation: fadeIn 0.3s;
}

/* Confetti Animation Styles */
.confetti-particle {
    position: absolute;
    will-change: transform;
    z-index: 9999;
    animation: confettiDrop 3.5s ease-in-out forwards;
}

@keyframes confettiDrop {
    0% {
        opacity: 1;
        transform: translateY(0) rotateX(0) rotateY(0);
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(1000px) rotateX(720deg) rotateY(720deg);
    }
}

.tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 20px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #cc0000 transparent;
}

.form-row input.error,
.form-row textarea.error {
    border-color: #cc0000;
    background-color: #fff8f8;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Help icon styles */
.help-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: #2271b1;
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    line-height: 16px;
    border-radius: 50%;
    margin-left: 5px;
    cursor: help;
}

.help-tooltip {
    display: none;
    position: absolute;
    background-color: #444;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 100;
    top: -5px;
    right: 0;
    width: 200px;
    box-sizing: border-box;
    font-weight: normal;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.help-icon:hover + .help-tooltip {
    display: block;
    animation: fadeIn 0.3s;
}

/* Styles for inline validation */
.validation-check {
    position: absolute;
    right: 10px;
    top: 35px;
    font-size: 16px;
    display: none;
}

.validation-check.valid {
    color: #006600;
    display: block;
}

.validation-check.invalid {
    color: #cc0000;
    display: block;
}

/* Social Sharing Styles */
.social-share-container {
    margin: 20px 0;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 5px;
    border-left: 3px solid #2271b1;
}

.social-share-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.social-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.social-share-button {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.social-share-button svg {
    margin-right: 8px;
}

.social-share-button.facebook {
    background-color: #1877f2;
}

.social-share-button.twitter {
    background-color: #1da1f2;
}

.social-share-button.linkedin {
    background-color: #0077b5;
}

.social-share-button.email {
    background-color: #dd4b39;
}

.social-share-button:hover {
    filter: brightness(110%);
    transform: translateY(-2px);
}

@media screen and (max-width: 768px) {
    .social-share-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .social-share-button {
        width: 100%;
        justify-content: center;
    }
}
