Plugin Directory

Changeset 2409806


Ignore:
Timestamp:
10/30/2020 02:35:02 PM (5 years ago)
Author:
ferkho
Message:

Ability to disable success email sending

Location:
gift-hunt/tags
Files:
8 edited
10 copied

Legend:

Unmodified
Added
Removed
  • gift-hunt/tags/1.0.1/assets/css/gifthunt.css

    r2330816 r2409806  
    1 .gifthunt-badge {
    2   display: inline-block;
    3   padding: .25em .4em;
    4   font-size: 75%;
    5   font-weight: 700;
    6   line-height: 1.5;
    7   text-align: center;
    8   white-space: nowrap;
    9   vertical-align: baseline;
    10   border-radius: .25rem;
    11   -webkit-transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;
    12   transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;
    13   transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    14   transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;
    15 }
    16 
    17 .gifthunt-badge--active {
    18   color: #fff;
    19   background-color: #28a745;
    20 }
    21 
    22 .gifthunt-badge--inactive {
    23   color: #212529;
    24   background-color: #f8f9fa;
    25 }
    26 
    27 .gifthunt-helptext {
    28   color: #888;
    29   margin: 2rem auto;
    30   text-align: center;
    31 }
    32 
    33 .gifthunt-helptext p {
    34   border: 1px solid #ddd;
    35   border-radius: 2rem;
    36   display: inline-block;
    37   padding: 1rem 2rem;
    38 }
    39 
    40 .gifthunt-helptext__icon {
    41   display: inline-block;
    42   height: 1rem;
    43   margin: 0 1rem 0 0;
    44   width: 1rem;
    45 }
    46 
    47 .gifthunt-helptext__icon svg {
    48   display: block;
    49   fill: #0073aa;
    50   margin-top: 2px;
    51 }
    52 
    53 .gifthunt-external-link-icon {
    54   display: inline-block;
    55   height: 1rem;
    56   width: 1rem;
    57   max-height: 100%;
    58   max-width: 100%;
    59   margin: auto;
    60 }
    61 
    62 .gifthunt-external-link-icon svg {
    63   display: block;
    64   fill: #0073aa;
    65   margin-top: 4px;
    66 }
    67 
    68 .gifthunt-form {
    69   display: -webkit-box;
    70   display: -ms-flexbox;
    71   display: flex;
    72   margin-top: 60px;
    73   max-width: 900px;
    74 }
    75 
    76 .gifthunt-form__form {
    77   -webkit-box-flex: 2;
    78       -ms-flex: 2;
    79           flex: 2;
    80 }
    81 
    82 .gifthunt-form__sidebar {
    83   -webkit-box-flex: 1;
    84       -ms-flex: 1;
    85           flex: 1;
    86   padding-left: 20px;
    87 }
    88 
    89 .gifthunt-form-result {
    90   margin: 10px 0;
    91   position: relative;
    92 }
    93 
    94 .gifthunt-form-result--error {
    95   background-color: #f9e2e2;
    96   border-left: 3px solid #d94f4f;
    97 }
    98 
    99 .gifthunt-form-result--success {
    100   background-color: #eff9f1;
    101   border-left: 3px solid #4ab866;
    102 }
    103 
    104 .gifthunt-form-result__content {
    105   margin: 1em 25px 1em 0;
    106   padding: 20px 12px;
    107 }
    108 
    109 .gifthunt-form-result__content ul {
    110   list-style: disc;
    111   margin: 20px 0 20px 20px;
    112 }
    113 
    114 .gifthunt-form-result__content ul li {
    115   margin: 0 0 15px 10px;
    116   padding: 0 0 0 5px;
    117 }
    118 
    119 .gifthunt-form-result__modal {
    120   -webkit-box-align: center;
    121       -ms-flex-align: center;
    122           align-items: center;
    123   background: rgba(0, 0, 0, 0.5);
    124   display: -webkit-box;
    125   display: -ms-flexbox;
    126   display: flex;
    127   height: 100%;
    128   -webkit-box-pack: center;
    129       -ms-flex-pack: center;
    130           justify-content: center;
    131   left: 0;
    132   overflow-y: auto;
    133   position: fixed;
    134   top: 0;
    135   width: 100%;
    136   z-index: 10000;
    137 }
    138 
    139 .gifthunt-form-result__modal-content {
    140   margin: 0 auto;
    141   max-width: 500px;
    142   width: 100%;
    143 }
    144 
    145 .gifthunt-form-result__modal.hidden {
    146   display: none;
    147 }
    148 
    149 .gifthunt-form-result__close-button {
    150   background: none;
    151   border: none;
    152   cursor: pointer;
    153   font-size: 18px;
    154   height: 30px;
    155   position: absolute;
    156   right: 0;
    157   top: 0;
    158   width: 30px;
    159 }
    160 
    161 .gifthunt-form__delete-confirm-modal, .gifthunt-form__test-mail-modal, .gifthunt-form__delete-hunter-confirm-modal, .gifthunt-form__success-email-template-preview-modal {
    162   -webkit-box-align: center;
    163       -ms-flex-align: center;
    164           align-items: center;
    165   background: rgba(0, 0, 0, 0.5);
    166   display: -webkit-box;
    167   display: -ms-flexbox;
    168   display: flex;
    169   height: 100%;
    170   -webkit-box-pack: center;
    171       -ms-flex-pack: center;
    172           justify-content: center;
    173   left: 0;
    174   overflow-y: auto;
    175   position: fixed;
    176   top: 0;
    177   width: 100%;
    178   z-index: 10000;
    179 }
    180 
    181 .gifthunt-form__delete-confirm-modal-content, .gifthunt-form__test-mail-modal-content, .gifthunt-form__delete-hunter-confirm-modal-content, .gifthunt-form__success-email-template-preview-modal-content {
    182   background: #fff;
    183   border-radius: 3px;
    184   -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    185           box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    186   margin: 0 auto;
    187   max-width: 500px;
    188   position: relative;
    189   width: 100%;
    190 }
    191 
    192 .gifthunt-form__delete-confirm-modal-content h3, .gifthunt-form__test-mail-modal-content h3, .gifthunt-form__delete-hunter-confirm-modal-content h3, .gifthunt-form__success-email-template-preview-modal-content h3 {
    193   border-bottom: 1px solid #eee;
    194   margin: 0 0 20px 0;
    195   padding: 20px;
    196 }
    197 
    198 .gifthunt-form__delete-confirm-modal-content p, .gifthunt-form__test-mail-modal-content p, .gifthunt-form__delete-hunter-confirm-modal-content p, .gifthunt-form__success-email-template-preview-modal-content p {
    199   border-bottom: 1px solid #eee;
    200   margin: 0 0 20px 0;
    201   padding: 0 20px 20px;
    202 }
    203 
    204 .gifthunt-form__delete-confirm-modal-content label, .gifthunt-form__delete-confirm-modal-content input, .gifthunt-form__test-mail-modal-content label, .gifthunt-form__test-mail-modal-content input, .gifthunt-form__delete-hunter-confirm-modal-content label, .gifthunt-form__delete-hunter-confirm-modal-content input, .gifthunt-form__success-email-template-preview-modal-content label, .gifthunt-form__success-email-template-preview-modal-content input {
    205   margin: 0 20px;
    206 }
    207 
    208 .gifthunt-form__delete-confirm-modal-content input, .gifthunt-form__test-mail-modal-content input, .gifthunt-form__delete-hunter-confirm-modal-content input, .gifthunt-form__success-email-template-preview-modal-content input {
    209   margin-bottom: 10px;
    210 }
    211 
    212 .gifthunt-form__delete-confirm-modal__close-button, .gifthunt-form__test-mail-modal__close-button, .gifthunt-form__delete-hunter-confirm-modal__close-button, .gifthunt-form__success-email-template-preview-modal__close-button {
    213   background: none;
    214   border: none;
    215   cursor: pointer;
    216   font-size: 18px;
    217   height: 30px;
    218   position: absolute;
    219   right: 0;
    220   top: 0;
    221   width: 30px;
    222 }
    223 
    224 .gifthunt-form__delete-confirm-actions, .gifthunt-form__test-mail-actions {
    225   display: -webkit-box;
    226   display: -ms-flexbox;
    227   display: flex;
    228   -webkit-box-pack: justify;
    229       -ms-flex-pack: justify;
    230           justify-content: space-between;
    231   padding: 0 20px 20px;
    232 }
    233 
    234 .gifthunt-form__delete-confirm-modal.hidden, .gifthunt-form__test-mail-modal.hidden, .gifthunt-form__delete-hunter-confirm-modal.hidden, .gifthunt-form__success-email-template-preview-modal.hidden {
    235   display: none;
    236 }
    237 
    238 .gifthunt-form__popup-design-preview-modal {
    239   -webkit-box-align: center;
    240       -ms-flex-align: center;
    241           align-items: center;
    242   background: rgba(0, 0, 0, 0.8);
    243   display: -webkit-box;
    244   display: -ms-flexbox;
    245   display: flex;
    246   height: 100%;
    247   -webkit-box-pack: center;
    248       -ms-flex-pack: center;
    249           justify-content: center;
    250   left: 0;
    251   overflow-y: scroll;
    252   position: fixed;
    253   top: 0;
    254   width: 100%;
    255   z-index: 99999;
    256 }
    257 
    258 .gifthunt-form__popup-design-preview-modal img {
    259   border-radius: 3px;
    260   -webkit-box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.8);
    261           box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.8);
    262   cursor: pointer;
    263 }
    264 
    265 .gifthunt-form__popup-design-preview-modal.hidden {
    266   display: none;
    267 }
    268 
    269 .gifthunt-form__success-email-template-preview-modal-body {
    270   border-bottom: 1px solid #eee;
    271   margin-bottom: 15px;
    272   padding: 0 15px 15px;
    273 }
    274 
    275 .gifthunt-form__success-email-template-preview-modal-body img {
    276   width: 100%;
    277 }
    278 
    279 .gifthunt-card {
    280   background: #fff;
    281   border: 1px solid #e5e5e5;
    282   -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    283           box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    284   margin: 10px 0;
    285   padding: 0;
    286 }
    287 
    288 .gifthunt-card__columns {
    289   display: -webkit-box;
    290   display: -ms-flexbox;
    291   display: flex;
    292 }
    293 
    294 .gifthunt-card__column {
    295   -webkit-box-flex: 1;
    296       -ms-flex: 1;
    297           flex: 1;
    298   padding: 0 20px 0 0;
    299 }
    300 
    301 .gifthunt-card__column:last-child {
    302   padding-right: 0;
    303 }
    304 
    305 .gifthunt-card__title {
    306   margin: 0;
    307   padding: 0;
    308 }
    309 
    310 .gifthunt-card__section {
    311   border-bottom: 1px solid #eee;
    312   padding: 20px;
    313 }
    314 
    315 .gifthunt-card__section--secondary {
    316   background: #f5f5f5;
    317   border-bottom: 1px solid #e3e3e3;
    318 }
    319 
    320 .gifthunt-card__section--closed, .gifthunt-card__section--opened {
    321   padding: 0;
    322 }
    323 
    324 .gifthunt-card__section--closed .gifthunt-form-group__label, .gifthunt-card__section--opened .gifthunt-form-group__label {
    325   padding: 10px 0 10px 10px;
    326 }
    327 
    328 .gifthunt-card__section--closed .gifthunt-form-group__label span, .gifthunt-card__section--opened .gifthunt-form-group__label span {
    329   display: inline-block;
    330   margin-right: 10px;
    331 }
    332 
    333 .gifthunt-card__section--closed .gifthunt-form-group__body, .gifthunt-card__section--opened .gifthunt-form-group__body {
    334   padding: 20px;
    335 }
    336 
    337 .gifthunt-card__section--closed .gifthunt-form-group__label {
    338   background: #ebebeb;
    339   border-bottom: 1px solid #eee;
    340 }
    341 
    342 .gifthunt-card__section--closed .gifthunt-form-group__body {
    343   display: none;
    344 }
    345 
    346 .gifthunt-card__section--opened .gifthunt-form-group__label {
    347   background: #f5f5f5;
    348   border-bottom: 1px solid #eee;
    349 }
    350 
    351 .gifthunt-card__section--opened .gifthunt-form-group__label span {
    352   -webkit-transform: rotate(90deg);
    353           transform: rotate(90deg);
    354 }
    355 
    356 .gifthunt-card__section--opened .gifthunt-form-group__body {
    357   display: block;
    358 }
    359 
    360 .gifthunt-card__section:last-child {
    361   border-bottom: none;
    362 }
    363 
    364 .gifthunt-form-group {
    365   display: -webkit-box;
    366   display: -ms-flexbox;
    367   display: flex;
    368   -webkit-box-orient: vertical;
    369   -webkit-box-direction: normal;
    370       -ms-flex-direction: column;
    371           flex-direction: column;
    372   margin: 0 auto 1.5rem;
    373 }
    374 
    375 .gifthunt-form-group__label {
    376   cursor: pointer;
    377   font-size: .9rem;
    378   font-weight: bold;
    379   line-height: 2rem;
    380 }
    381 
    382 .gifthunt-form-group label {
    383   cursor: pointer;
    384   line-height: 2rem;
    385 }
    386 
    387 .gifthunt-form-group input[type="text"], .gifthunt-form-group input[type="email"], .gifthunt-form-group input[type="number"], .gifthunt-form-group input[type="url"] {
    388   height: 2.5rem;
    389   line-height: 2.5rem;
    390 }
    391 
    392 .gifthunt-form-group input::-webkit-input-placeholder {
    393   color: #c2c2c2;
    394   font-style: italic;
    395 }
    396 
    397 .gifthunt-form-group input:-ms-input-placeholder {
    398   color: #c2c2c2;
    399   font-style: italic;
    400 }
    401 
    402 .gifthunt-form-group input::-ms-input-placeholder {
    403   color: #c2c2c2;
    404   font-style: italic;
    405 }
    406 
    407 .gifthunt-form-group input::placeholder {
    408   color: #c2c2c2;
    409   font-style: italic;
    410 }
    411 
    412 .gifthunt-form-group input.gifthunt-field-error {
    413   background-color: #fbeae5;
    414   border-color: #bf0711;
    415 }
    416 
    417 .gifthunt-form-group textarea.gifthunt-field-error {
    418   background-color: #fbeae5;
    419   border-color: #bf0711;
    420 }
    421 
    422 .gifthunt-form-group__help-text {
    423   color: #888;
    424   margin: .5rem 0;
    425   padding: 0;
    426 }
    427 
    428 .gifthunt-form-group__body label {
    429   display: block;
    430 }
    431 
    432 .gifthunt-form-group:last-child {
    433   margin-bottom: 0;
    434 }
    435 
    436 .gifthunt-input-group {
    437   display: -webkit-box;
    438   display: -ms-flexbox;
    439   display: flex;
    440 }
    441 
    442 .gifthunt-input-group input {
    443   -webkit-box-flex: 1;
    444       -ms-flex: 1;
    445           flex: 1;
    446 }
    447 
    448 .gifthunt-input-group button {
    449   height: 2.5rem !important;
    450   line-height: 2.5rem !important;
    451   margin-left: 20px !important;
    452   color: #bf0711 !important;
    453 }
    454 
    455 .gifthunt--hidden {
    456   display: none;
    457 }
    458 
    459 .gifthunt-page-actions {
    460   -webkit-box-align: center;
    461       -ms-flex-align: center;
    462           align-items: center;
    463   border-top: 1px solid #ccc;
    464   display: -webkit-box;
    465   display: -ms-flexbox;
    466   display: flex;
    467   -webkit-box-pack: justify;
    468       -ms-flex-pack: justify;
    469           justify-content: space-between;
    470   margin: 20px 0;
    471   max-width: 900px;
    472   padding: 20px 0;
    473 }
    474 
    475 .gifthunt-page-actions--header {
    476   border-top: none;
    477   -webkit-box-pack: end;
    478       -ms-flex-pack: end;
    479           justify-content: flex-end;
    480   margin: 0;
    481   padding: 10px 0;
    482 }
    483 
    484 .gifthunt-page-actions--header .button {
    485   margin-left: 20px;
    486 }
    487 
    488 .gifthunt-page-actions--header h1 {
    489   width: 100%;
    490 }
    491 
    492 .gifthunt-page-actions--header h1 small {
    493   font-size: 13px;
    494 }
    495 
    496 .gifthunt-button i {
    497   display: -webkit-inline-box;
    498   display: -ms-inline-flexbox;
    499   display: inline-flex;
    500   height: 100%;
    501 }
    502 
    503 .gifthunt-button i svg {
    504   -ms-flex-item-align: center;
    505       -ms-grid-row-align: center;
    506       align-self: center;
    507 }
    508 
    509 .gifthunt-button i.hidden {
    510   display: none;
    511 }
    512 
    513 .gifthunt-button--link {
    514   color: #888;
    515   line-height: 3rem;
    516   text-decoration: none;
    517 }
    518 
    519 .gifthunt-button--danger {
    520   background: #bf0711 !important;
    521   border-color: #bf0711 !important;
    522   color: #fff !important;
    523 }
    524 
    525 .gifthunt-button--danger:hover {
    526   background: #a1030b !important;
    527   border-color: #6d0308 !important;
    528 }
    529 
    530 .gifthunt-button--danger:disabled.button, .gifthunt-button--danger[disabled].button {
    531   background: #a1030b !important;
    532   border-color: #6d0308 !important;
    533   color: #fff !important;
    534   text-shadow: none !important;
    535   opacity: .8;
    536 }
    537 
    538 .gifthunt-error-message {
    539   color: #bf0711;
    540   line-height: 1.5rem;
    541 }
    542 
    543 .gifthunt-accordion {
    544   border: 1px solid #eee;
    545 }
    546 
    547 .gifthunt-accordion__title {
    548   background: #ebebeb;
    549   border-bottom: 1px solid #eee;
    550   color: #555;
    551   cursor: pointer;
    552   font-size: 14px;
    553   font-weight: 700;
    554   line-height: 40px;
    555   margin: 0;
    556   padding: 0 0 0 10px;
    557 }
    558 
    559 .gifthunt-accordion__title span {
    560   display: inline-block;
    561   margin-right: 5px;
    562 }
    563 
    564 .gifthunt-accordion__info {
    565   border-bottom: 1px solid #eee;
    566   color: #888;
    567   margin: -15px -15px 10px;
    568   padding: .5rem 1rem;
    569 }
    570 
    571 .gifthunt-accordion__body {
    572   display: none;
    573   padding: 15px;
    574 }
    575 
    576 .gifthunt-accordion__section--active .gifthunt-accordion__title {
    577   background: #f5f5f5;
    578   cursor: default;
    579   font-weight: 400;
    580 }
    581 
    582 .gifthunt-accordion__section--active .gifthunt-accordion__title span {
    583   -webkit-transform: rotate(90deg);
    584           transform: rotate(90deg);
    585 }
    586 
    587 .gifthunt-accordion__section--active .gifthunt-accordion__body {
    588   display: block;
    589 }
    590 
    591 #gifthunt-send-test-success-email {
    592   max-width: 140px;
    593 }
    594 
    595 #gifthunt-success-email-list {
    596   list-style-type: square;
    597   margin-left: 20px;
    598 }
    599 
    600 #gifthunt-success-email-list li {
    601   margin-bottom: 20px;
    602 }
    603 
    604 #gifthunt-success-email-list li span {
    605   font-family: 'Courier New', Courier, monospace;
    606 }
    607 
    608 #gifthunt__icon-list {
    609   display: -webkit-box;
    610   display: -ms-flexbox;
    611   display: flex;
    612   -ms-flex-wrap: wrap;
    613       flex-wrap: wrap;
    614 }
    615 
    616 #gifthunt__icon-list label {
    617   -webkit-box-align: center;
    618       -ms-flex-align: center;
    619           align-items: center;
    620   display: -webkit-box;
    621   display: -ms-flexbox;
    622   display: flex;
    623   -webkit-box-orient: vertical;
    624   -webkit-box-direction: normal;
    625       -ms-flex-direction: column;
    626           flex-direction: column;
    627   margin: 10px 10px 10px 0;
    628 }
    629 
    630 #gifthunt__icon-list label .gifthunt-icon-preview {
    631   border: 2px solid #eee;
    632   border-radius: 3px;
    633   display: block;
    634   height: 70px;
    635   margin: 10px auto;
    636   width: 70px;
    637 }
    638 
    639 #gifthunt__icon-list label .gifthunt-icon-preview img {
    640   max-width: 70px;
    641   width: 100%;
    642 }
    643 
    644 #gifthunt__icon-list label .gifthunt-icon-preview:hover {
    645   border: 2px solid #ccc;
    646 }
    647 
    648 #gifthunt__icon-list label input[type="radio"]:checked + .gifthunt-icon-preview {
    649   border: 2px solid #007cb2;
    650 }
    651 
    652 #gifthunt__icon-upload-preview label {
    653   display: none;
    654 }
    655 
    656 #gifthunt__icon-upload-preview img {
    657   max-width: 70px;
    658 }
    659 
    660 #gifthunt__icon-upload-preview input[type="radio"]:checked + .gifthunt-icon-preview {
    661   border: 2px solid #007cb2;
    662 }
    663 
    664 #gifthunt__icon-upload .gifthunt__icon-upload-button-column {
    665   text-align: right;
    666 }
    667 
    668 #gifthunt__icon-animation-list {
    669   display: -webkit-box;
    670   display: -ms-flexbox;
    671   display: flex;
    672   -ms-flex-wrap: wrap;
    673       flex-wrap: wrap;
    674 }
    675 
    676 #gifthunt__icon-animation-list label {
    677   -webkit-box-align: center;
    678       -ms-flex-align: center;
    679           align-items: center;
    680   display: -webkit-box;
    681   display: -ms-flexbox;
    682   display: flex;
    683   -webkit-box-orient: vertical;
    684   -webkit-box-direction: normal;
    685       -ms-flex-direction: column;
    686           flex-direction: column;
    687   margin: 10px 10px 10px 0;
    688 }
    689 
    690 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview {
    691   border: 2px solid #eee;
    692   border-radius: 3px;
    693   display: block;
    694   height: 70px;
    695   margin: 10px auto;
    696   position: relative;
    697   width: 70px;
    698 }
    699 
    700 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview:hover {
    701   border: 2px solid #ccc;
    702 }
    703 
    704 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview span {
    705   background: #ddd;
    706   border-radius: 30px;
    707   display: block;
    708   height: 30px;
    709   margin: 20px auto;
    710   width: 30px;
    711 }
    712 
    713 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .pop {
    714   -webkit-animation-duration: 3s;
    715           animation-duration: 3s;
    716   -webkit-animation-iteration-count: infinite;
    717           animation-iteration-count: infinite;
    718   -webkit-animation-name: pop;
    719           animation-name: pop;
    720 }
    721 
    722 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .bounce {
    723   -webkit-animation-duration: 3s;
    724           animation-duration: 3s;
    725   -webkit-animation-iteration-count: infinite;
    726           animation-iteration-count: infinite;
    727   -webkit-animation-name: bounce;
    728           animation-name: bounce;
    729 }
    730 
    731 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .shake {
    732   -webkit-animation-duration: 3s;
    733           animation-duration: 3s;
    734   -webkit-animation-iteration-count: infinite;
    735           animation-iteration-count: infinite;
    736   -webkit-animation-name: shake;
    737           animation-name: shake;
    738 }
    739 
    740 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .fade_left {
    741   -webkit-animation-duration: 3s;
    742           animation-duration: 3s;
    743   -webkit-animation-iteration-count: infinite;
    744           animation-iteration-count: infinite;
    745   -webkit-animation-name: fade_left;
    746           animation-name: fade_left;
    747 }
    748 
    749 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .fade_right {
    750   -webkit-animation-duration: 3s;
    751           animation-duration: 3s;
    752   -webkit-animation-iteration-count: infinite;
    753           animation-iteration-count: infinite;
    754   -webkit-animation-name: fade_right;
    755           animation-name: fade_right;
    756 }
    757 
    758 #gifthunt__icon-animation-list label input[type="radio"]:checked + .gifthunt-icon-animation-preview {
    759   border: 2px solid #007cb2;
    760 }
    761 
    762 #gifthunt__icon-animation-list label input[type="radio"]:checked + .gifthunt-icon-animation-preview span {
    763   background: #555;
    764 }
    765 
    766 #gifthunt__popup-design-list {
    767   display: -webkit-box;
    768   display: -ms-flexbox;
    769   display: flex;
    770   -ms-flex-wrap: wrap;
    771       flex-wrap: wrap;
    772 }
    773 
    774 #gifthunt__popup-design-list label {
    775   -webkit-box-align: center;
    776       -ms-flex-align: center;
    777           align-items: center;
    778   display: -webkit-box;
    779   display: -ms-flexbox;
    780   display: flex;
    781   -webkit-box-orient: vertical;
    782   -webkit-box-direction: normal;
    783       -ms-flex-direction: column;
    784           flex-direction: column;
    785   margin: 10px 10px 10px 0;
    786 }
    787 
    788 #gifthunt__popup-design-list label .gifthunt-popup-design-preview {
    789   border: 2px solid #eee;
    790   border-radius: 3px;
    791   display: block;
    792   height: 120px;
    793   margin: 10px auto;
    794   padding: 5px;
    795   position: relative;
    796   width: 80px;
    797 }
    798 
    799 #gifthunt__popup-design-list label .gifthunt-popup-design-preview:hover {
    800   border: 2px solid #ccc;
    801 }
    802 
    803 #gifthunt__popup-design-list label .gifthunt-popup-design-preview img {
    804   width: 100%;
    805 }
    806 
    807 #gifthunt__popup-design-list label input[type="radio"]:checked + .gifthunt-popup-design-preview {
    808   border: 2px solid #007cb2;
    809 }
    810 
    811 #gifthunt__popup-design-list label input[type="radio"]:checked + .gifthunt-popup-design-preview span {
    812   background: #555;
    813 }
    814 
    815 #gifthunt__success-email-template-list {
    816   display: -webkit-box;
    817   display: -ms-flexbox;
    818   display: flex;
    819   -ms-flex-wrap: wrap;
    820       flex-wrap: wrap;
    821 }
    822 
    823 #gifthunt__success-email-template-list label {
    824   -webkit-box-align: center;
    825       -ms-flex-align: center;
    826           align-items: center;
    827   display: -webkit-box;
    828   display: -ms-flexbox;
    829   display: flex;
    830   -webkit-box-orient: vertical;
    831   -webkit-box-direction: normal;
    832       -ms-flex-direction: column;
    833           flex-direction: column;
    834   margin: 10px 10px 10px 0;
    835 }
    836 
    837 #gifthunt__success-email-template-list label .gifthunt-success-email-template-preview {
    838   border: 2px solid #eee;
    839   border-radius: 3px;
    840   display: block;
    841   height: 55px;
    842   margin: 10px auto;
    843   padding: 5px;
    844   position: relative;
    845   width: 80px;
    846 }
    847 
    848 #gifthunt__success-email-template-list label .gifthunt-success-email-template-preview:hover {
    849   border: 2px solid #ccc;
    850 }
    851 
    852 #gifthunt__success-email-template-list label .gifthunt-success-email-template-preview img {
    853   width: 100%;
    854 }
    855 
    856 #gifthunt__success-email-template-list label input[type="radio"]:checked + .gifthunt-popup-design-preview {
    857   border: 2px solid #007cb2;
    858 }
    859 
    860 #gifthunt__success-email-template-list label input[type="radio"]:checked + .gifthunt-popup-design-preview span {
    861   background: #555;
    862 }
    863 
    864 @-webkit-keyframes pop {
    865   0% {
    866     -webkit-transform: scale(0, 0);
    867             transform: scale(0, 0);
    868   }
    869   10% {
    870     -webkit-transform: scale(1.5, 1.5);
    871             transform: scale(1.5, 1.5);
    872   }
    873   15% {
    874     -webkit-transform: scale(0.5, 0.5);
    875             transform: scale(0.5, 0.5);
    876   }
    877   20% {
    878     -webkit-transform: scale(1.2, 1.2);
    879             transform: scale(1.2, 1.2);
    880   }
    881   25% {
    882     -webkit-transform: scale(0.8, 0.8);
    883             transform: scale(0.8, 0.8);
    884   }
    885   30% {
    886     -webkit-transform: scale(1, 1);
    887             transform: scale(1, 1);
    888   }
    889   89% {
    890     -webkit-transform: scale(1, 1);
    891             transform: scale(1, 1);
    892   }
    893   90% {
    894     -webkit-transform: scale(1.2, 1.2);
    895             transform: scale(1.2, 1.2);
    896   }
    897   100% {
    898     -webkit-transform: scale(1, 1);
    899             transform: scale(1, 1);
    900   }
    901 }
    902 
    903 @keyframes pop {
    904   0% {
    905     -webkit-transform: scale(0, 0);
    906             transform: scale(0, 0);
    907   }
    908   10% {
    909     -webkit-transform: scale(1.5, 1.5);
    910             transform: scale(1.5, 1.5);
    911   }
    912   15% {
    913     -webkit-transform: scale(0.5, 0.5);
    914             transform: scale(0.5, 0.5);
    915   }
    916   20% {
    917     -webkit-transform: scale(1.2, 1.2);
    918             transform: scale(1.2, 1.2);
    919   }
    920   25% {
    921     -webkit-transform: scale(0.8, 0.8);
    922             transform: scale(0.8, 0.8);
    923   }
    924   30% {
    925     -webkit-transform: scale(1, 1);
    926             transform: scale(1, 1);
    927   }
    928   89% {
    929     -webkit-transform: scale(1, 1);
    930             transform: scale(1, 1);
    931   }
    932   90% {
    933     -webkit-transform: scale(1.2, 1.2);
    934             transform: scale(1.2, 1.2);
    935   }
    936   100% {
    937     -webkit-transform: scale(1, 1);
    938             transform: scale(1, 1);
    939   }
    940 }
    941 
    942 @-webkit-keyframes bounce {
    943   0% {
    944     margin-top: 20px;
    945   }
    946   5% {
    947     margin-top: 0px;
    948   }
    949   10% {
    950     margin-top: 20px;
    951   }
    952   15% {
    953     margin-top: 5px;
    954   }
    955   20% {
    956     margin-top: 20px;
    957   }
    958   25% {
    959     margin-top: 10px;
    960   }
    961   30% {
    962     margin-top: 20px;
    963   }
    964   35% {
    965     margin-top: 15px;
    966   }
    967   40% {
    968     margin-top: 20px;
    969   }
    970 }
    971 
    972 @keyframes bounce {
    973   0% {
    974     margin-top: 20px;
    975   }
    976   5% {
    977     margin-top: 0px;
    978   }
    979   10% {
    980     margin-top: 20px;
    981   }
    982   15% {
    983     margin-top: 5px;
    984   }
    985   20% {
    986     margin-top: 20px;
    987   }
    988   25% {
    989     margin-top: 10px;
    990   }
    991   30% {
    992     margin-top: 20px;
    993   }
    994   35% {
    995     margin-top: 15px;
    996   }
    997   40% {
    998     margin-top: 20px;
    999   }
    1000 }
    1001 
    1002 @-webkit-keyframes shake {
    1003   0% {
    1004     margin-left: 20px;
    1005   }
    1006   5% {
    1007     margin-left: 5px;
    1008   }
    1009   10% {
    1010     margin-left: 35px;
    1011   }
    1012   15% {
    1013     margin-left: 10px;
    1014   }
    1015   20% {
    1016     margin-left: 30px;
    1017   }
    1018   25% {
    1019     margin-left: 15px;
    1020   }
    1021   30% {
    1022     margin-left: 25px;
    1023   }
    1024   35% {
    1025     margin-left: 20px;
    1026   }
    1027 }
    1028 
    1029 @keyframes shake {
    1030   0% {
    1031     margin-left: 20px;
    1032   }
    1033   5% {
    1034     margin-left: 5px;
    1035   }
    1036   10% {
    1037     margin-left: 35px;
    1038   }
    1039   15% {
    1040     margin-left: 10px;
    1041   }
    1042   20% {
    1043     margin-left: 30px;
    1044   }
    1045   25% {
    1046     margin-left: 15px;
    1047   }
    1048   30% {
    1049     margin-left: 25px;
    1050   }
    1051   35% {
    1052     margin-left: 20px;
    1053   }
    1054 }
    1055 
    1056 @-webkit-keyframes fade_left {
    1057   0% {
    1058     margin-left: 0;
    1059     opacity: 0;
    1060   }
    1061   30% {
    1062     margin-left: 25px;
    1063     opacity: 1;
    1064   }
    1065   35% {
    1066     margin-left: 20px;
    1067   }
    1068 }
    1069 
    1070 @keyframes fade_left {
    1071   0% {
    1072     margin-left: 0;
    1073     opacity: 0;
    1074   }
    1075   30% {
    1076     margin-left: 25px;
    1077     opacity: 1;
    1078   }
    1079   35% {
    1080     margin-left: 20px;
    1081   }
    1082 }
    1083 
    1084 @-webkit-keyframes fade_right {
    1085   0% {
    1086     margin-left: 40px;
    1087     opacity: 0;
    1088   }
    1089   30% {
    1090     margin-left: 15px;
    1091     opacity: 1;
    1092   }
    1093   35% {
    1094     margin-left: 20px;
    1095   }
    1096 }
    1097 
    1098 @keyframes fade_right {
    1099   0% {
    1100     margin-left: 40px;
    1101     opacity: 0;
    1102   }
    1103   30% {
    1104     margin-left: 15px;
    1105     opacity: 1;
    1106   }
    1107   35% {
    1108     margin-left: 20px;
    1109   }
    1110 }
    1111 
    1112 @media only screen and (max-width: 600px) {
    1113   .gifthunt-card__columns {
    1114     -webkit-box-orient: vertical;
    1115     -webkit-box-direction: normal;
    1116         -ms-flex-direction: column;
    1117             flex-direction: column;
    1118   }
    1119   .gifthunt-card__column {
    1120     padding: 0;
    1121   }
    1122 }
    1123 
    1124 .gifthunt-spin {
    1125   -webkit-animation: gifthunt_spin_animation 1s linear infinite;
    1126           animation: gifthunt_spin_animation 1s linear infinite;
    1127 }
    1128 
    1129 @-webkit-keyframes gifthunt_spin_animation {
    1130   100% {
    1131     -webkit-transform: rotate(360deg);
    1132     transform: rotate(360deg);
    1133   }
    1134 }
    1135 
    1136 @keyframes gifthunt_spin_animation {
    1137   100% {
    1138     -webkit-transform: rotate(360deg);
    1139     transform: rotate(360deg);
    1140   }
    1141 }
    1142 
    1143 .gifthunt-hunters-list .gifthunt-page-actions {
    1144   max-width: 100%;
    1145 }
    1146 
    1147 .gifthunt-hunters-list .gifthunt-page-actions--secondary {
    1148   -webkit-box-align: center;
    1149       -ms-flex-align: center;
    1150           align-items: center;
    1151   display: -webkit-box;
    1152   display: -ms-flexbox;
    1153   display: flex;
    1154 }
    1155 
    1156 .gifthunt-hunters-list .gifthunt-page-actions--secondary .button {
    1157   margin-left: 20px;
    1158 }
    1159 
    1160 .gifthunt-hunters-list .gifthunt-page-actions--header {
    1161   padding-bottom: 0;
    1162 }
    1163 
    1164 .gifthunt-hunters-list .button-delete-hunter {
    1165   font-weight: bold;
    1166 }
    1167 
    1168 .gifthunt-hunters-list .subsubsub {
    1169   margin: 0 0 10px;
    1170 }
    1171 
    1172 .gifthunt-hunters-list__empty-state {
    1173   clear: both;
    1174   color: #888;
    1175   display: block;
    1176   font-size: 16px;
    1177   font-style: italic;
    1178   padding: 10px 0;
    1179   text-align: center;
    1180 }
    1181 
    1182 .info--premium {
    1183   background: #fff5de;
    1184   padding: 10px;
    1185   border-radius: 3px;
    1186   border: 1px solid #e8b646;
    1187   text-decoration: none;
    1188   color: #555;
    1189 }
    1190 
    1191 .info--premium a {
    1192   color: #9f700b;
    1193   font-weight: bold;
    1194 }
    1195 
    1196 /**
    1197  * Fixed header CSS from default wp css
    1198  */
    1199 @media (min-width: 782px) {
    1200   body.js.is-fullscreen-mode .edit-post-header {
    1201     -webkit-transform: translateY(-100%);
    1202             transform: translateY(-100%);
    1203     -webkit-animation: edit-post-fullscreen-mode__slide-in-animation 0.1s forwards;
    1204             animation: edit-post-fullscreen-mode__slide-in-animation 0.1s forwards;
    1205   }
    1206 }
    1207 
    1208 @media (min-width: 782px) and (prefers-reduced-motion: reduce) {
    1209   body.js.is-fullscreen-mode .edit-post-header {
    1210     -webkit-animation-duration: 1ms !important;
    1211             animation-duration: 1ms !important;
    1212   }
    1213 }
    1214 
    1215 @-webkit-keyframes edit-post-fullscreen-mode__slide-in-animation {
    1216   100% {
    1217     -webkit-transform: translateY(0%);
    1218             transform: translateY(0%);
    1219   }
    1220 }
    1221 
    1222 @keyframes edit-post-fullscreen-mode__slide-in-animation {
    1223   100% {
    1224     -webkit-transform: translateY(0%);
    1225             transform: translateY(0%);
    1226   }
    1227 }
    1228 
    1229 .edit-post-header {
    1230   height: 50px;
    1231   padding: 0;
    1232   background: #f1f1f1;
    1233   display: -webkit-box;
    1234   display: -ms-flexbox;
    1235   display: flex;
    1236   z-index: 1100;
    1237   left: 0;
    1238   right: 0;
    1239   top: 0;
    1240   position: -webkit-sticky;
    1241   position: sticky;
    1242 }
    1243 
    1244 @media (min-width: 600px) {
    1245   .edit-post-header {
    1246     position: fixed;
    1247     padding: 5px 20px;
    1248     top: 46px;
    1249   }
    1250 }
    1251 
    1252 @media (min-width: 782px) {
    1253   .edit-post-header {
    1254     top: 32px;
    1255   }
    1256   body.is-fullscreen-mode .edit-post-header {
    1257     top: 0;
    1258   }
    1259 }
    1260 
    1261 .edit-post-header .editor-post-switch-to-draft + .editor-post-preview {
    1262   display: none;
    1263 }
    1264 
    1265 @media (min-width: 600px) {
    1266   .edit-post-header .editor-post-switch-to-draft + .editor-post-preview {
    1267     display: -webkit-inline-box;
    1268     display: -ms-inline-flexbox;
    1269     display: inline-flex;
    1270   }
    1271 }
    1272 
    1273 .edit-post-header > .edit-post-header__settings {
    1274   -webkit-box-ordinal-group: 2;
    1275       -ms-flex-order: 1;
    1276           order: 1;
    1277 }
    1278 
    1279 @supports ((position: -webkit-sticky) or (position: sticky)) {
    1280   .edit-post-header > .edit-post-header__settings {
    1281     -webkit-box-ordinal-group: initial;
    1282         -ms-flex-order: initial;
    1283             order: initial;
    1284   }
    1285 }
    1286 
    1287 .edit-post-header {
    1288   /* Set left position when auto-fold is not on the body element. */
    1289   left: 0;
    1290 }
    1291 
    1292 @media (min-width: 782px) {
    1293   .edit-post-header {
    1294     left: 160px;
    1295   }
    1296 }
    1297 
    1298 @media (min-width: 782px) {
    1299   .auto-fold .edit-post-header {
    1300     left: 36px;
    1301   }
    1302 }
    1303 
    1304 @media (min-width: 960px) {
    1305   .auto-fold .edit-post-header {
    1306     left: 160px;
    1307   }
    1308 }
    1309 
    1310 /* Sidebar manually collapsed. */
    1311 .folded .edit-post-header {
    1312   left: 0;
    1313 }
    1314 
    1315 @media (min-width: 782px) {
    1316   .folded .edit-post-header {
    1317     left: 36px;
    1318   }
    1319 }
    1320 
    1321 /* Mobile menu opened. */
    1322 @media (max-width: 782px) {
    1323   .auto-fold .wp-responsive-open .edit-post-header {
    1324     left: 190px;
    1325   }
    1326 }
    1327 
    1328 /* In small screens with responsive menu expanded there is small white space. */
    1329 @media (max-width: 600px) {
    1330   .auto-fold .wp-responsive-open .edit-post-header {
    1331     margin-left: -18px;
    1332   }
    1333 }
    1334 
    1335 body.is-fullscreen-mode .edit-post-header {
    1336   left: 0 !important;
    1337 }
    1338 
    1339 .edit-post-header__settings {
    1340   display: -webkit-inline-box;
    1341   display: -ms-inline-flexbox;
    1342   display: inline-flex;
    1343   -webkit-box-align: center;
    1344       -ms-flex-align: center;
    1345           align-items: center;
    1346 }
    1347 
    1348 .edit-post-header .components-button.is-toggled {
    1349   color: #fff;
    1350   background: #555d66;
    1351   margin: 1px;
    1352   padding: 7px;
    1353 }
    1354 
    1355 .edit-post-header .components-button.is-toggled:hover, .edit-post-header .components-button.is-toggled:focus {
    1356   -webkit-box-shadow: 0 0 0 1px #555d66, inset 0 0 0 1px #fff !important;
    1357           box-shadow: 0 0 0 1px #555d66, inset 0 0 0 1px #fff !important;
    1358   color: #fff !important;
    1359   background: #555d66 !important;
    1360 }
    1361 
    1362 .edit-post-header .components-button.editor-post-save-draft, .edit-post-header .components-button.editor-post-switch-to-draft, .edit-post-header .components-button.editor-post-preview, .edit-post-header .components-button.editor-post-publish-button, .edit-post-header .components-button.editor-post-publish-panel__toggle {
    1363   margin: 2px;
    1364   height: 33px;
    1365   line-height: 32px;
    1366   font-size: 13px;
    1367 }
    1368 
    1369 .edit-post-header .components-button.editor-post-save-draft, .edit-post-header .components-button.editor-post-switch-to-draft {
    1370   padding: 0 5px;
    1371 }
    1372 
    1373 @media (min-width: 600px) {
    1374   .edit-post-header .components-button.editor-post-save-draft, .edit-post-header .components-button.editor-post-switch-to-draft {
    1375     padding: 0 12px;
    1376   }
    1377 }
    1378 
    1379 .edit-post-header .components-button.editor-post-preview, .edit-post-header .components-button.editor-post-publish-button, .edit-post-header .components-button.editor-post-publish-panel__toggle {
    1380   padding: 0 5px 2px;
    1381 }
    1382 
    1383 @media (min-width: 600px) {
    1384   .edit-post-header .components-button.editor-post-preview, .edit-post-header .components-button.editor-post-publish-button, .edit-post-header .components-button.editor-post-publish-panel__toggle {
    1385     padding: 0 12px 2px;
    1386   }
    1387 }
    1388 
    1389 @media (min-width: 782px) {
    1390   .edit-post-header .components-button.editor-post-preview {
    1391     margin: 0 3px 0 12px;
    1392   }
    1393   .edit-post-header .components-button.editor-post-publish-button, .edit-post-header .components-button.editor-post-publish-panel__toggle {
    1394     margin: 0 12px 0 3px;
    1395   }
    1396 }
    1397 
    1398 .edit-post-fullscreen-mode-close__toolbar {
    1399   display: none;
    1400 }
    1401 
    1402 @media (min-width: 782px) {
    1403   .edit-post-fullscreen-mode-close__toolbar {
    1404     display: block;
    1405     border-top: 0;
    1406     border-bottom: 0;
    1407     border-left: 0;
    1408     margin: -9px 10px -9px -10px;
    1409     padding: 9px 10px;
    1410   }
    1411 }
    1412 
    1413 .edit-post-header-toolbar {
    1414   display: -webkit-inline-box;
    1415   display: -ms-inline-flexbox;
    1416   display: inline-flex;
    1417   -webkit-box-align: center;
    1418       -ms-flex-align: center;
    1419           align-items: center;
    1420 }
    1421 
    1422 .edit-post-header-toolbar > .components-button {
    1423   display: none;
    1424 }
    1425 
    1426 @media (min-width: 600px) {
    1427   .edit-post-header-toolbar > .components-button {
    1428     display: -webkit-inline-box;
    1429     display: -ms-inline-flexbox;
    1430     display: inline-flex;
    1431   }
    1432 }
    1433 
    1434 .edit-post-header-toolbar .block-editor-block-navigation,
    1435 .edit-post-header-toolbar .table-of-contents {
    1436   display: none;
    1437 }
    1438 
    1439 @media (min-width: 600px) {
    1440   .edit-post-header-toolbar .block-editor-block-navigation,
    1441   .edit-post-header-toolbar .table-of-contents {
    1442     display: -webkit-box;
    1443     display: -ms-flexbox;
    1444     display: flex;
    1445   }
    1446 }
    1447 
    1448 .edit-post-header-toolbar__block-toolbar {
    1449   position: absolute;
    1450   top: 56px;
    1451   left: 0;
    1452   right: 0;
    1453   background: #fff;
    1454   min-height: 37px;
    1455   border-bottom: 1px solid #e2e4e7;
    1456 }
    1457 
    1458 .edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar .components-toolbar {
    1459   border-top: none;
    1460   border-bottom: none;
    1461 }
    1462 
    1463 .is-sidebar-opened .edit-post-header-toolbar__block-toolbar {
    1464   display: none;
    1465 }
    1466 
    1467 @media (min-width: 782px) {
    1468   .is-sidebar-opened .edit-post-header-toolbar__block-toolbar {
    1469     display: block;
    1470     right: 280px;
    1471   }
    1472 }
    1473 
    1474 @media (min-width: 1080px) {
    1475   .edit-post-header-toolbar__block-toolbar {
    1476     padding-left: 8px;
    1477     position: static;
    1478     left: auto;
    1479     right: auto;
    1480     background: none;
    1481     border-bottom: none;
    1482     min-height: auto;
    1483   }
    1484   .is-sidebar-opened .edit-post-header-toolbar__block-toolbar {
    1485     right: auto;
    1486   }
    1487   .edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar {
    1488     margin: -9px 0;
    1489   }
    1490   .edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar .components-toolbar {
    1491     padding: 10px 4px 9px;
    1492   }
    1493 }
    1494 /*# sourceMappingURL=gifthunt.css.map */
     1.gifthunt-badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1.5;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out}.gifthunt-badge--active{color:#fff;background-color:#28a745}.gifthunt-badge--inactive{color:#212529;background-color:#f8f9fa}.gifthunt-helptext{color:#888;margin:2rem auto;text-align:center}.gifthunt-helptext p{border:1px solid #ddd;border-radius:2rem;display:inline-block;padding:1rem 2rem}.gifthunt-helptext__icon{display:inline-block;height:1rem;margin:0 1rem 0 0;width:1rem}.gifthunt-helptext__icon svg{display:block;fill:#0073aa;margin-top:2px}.gifthunt-external-link-icon{display:inline-block;height:1rem;width:1rem;max-height:100%;max-width:100%;margin:auto}.gifthunt-external-link-icon svg{display:block;fill:#0073aa;margin-top:4px}.gifthunt-form{display:-webkit-box;display:-ms-flexbox;display:flex;margin-top:60px;max-width:900px}.gifthunt-form__form{-webkit-box-flex:2;-ms-flex:2;flex:2}.gifthunt-form__sidebar{-webkit-box-flex:1;-ms-flex:1;flex:1;padding-left:20px}.gifthunt-form-result{margin:10px 0;position:relative}.gifthunt-form-result--error{background-color:#f9e2e2;border-left:3px solid #d94f4f}.gifthunt-form-result--success{background-color:#eff9f1;border-left:3px solid #4ab866}.gifthunt-form-result__content{margin:1em 25px 1em 0;padding:20px 12px}.gifthunt-form-result__content ul{list-style:disc;margin:20px 0 20px 20px}.gifthunt-form-result__content ul li{margin:0 0 15px 10px;padding:0 0 0 5px}.gifthunt-form-result__modal{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:rgba(0,0,0,0.5);display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;left:0;overflow-y:auto;position:fixed;top:0;width:100%;z-index:10000}.gifthunt-form-result__modal-content{margin:0 auto;max-width:500px;width:100%}.gifthunt-form-result__modal.hidden{display:none}.gifthunt-form-result__close-button{background:none;border:none;cursor:pointer;font-size:18px;height:30px;position:absolute;right:0;top:0;width:30px}.gifthunt-form__delete-confirm-modal,.gifthunt-form__test-mail-modal,.gifthunt-form__delete-hunter-confirm-modal,.gifthunt-form__success-email-template-preview-modal{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:rgba(0,0,0,0.5);display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;left:0;overflow-y:auto;position:fixed;top:0;width:100%;z-index:10000}.gifthunt-form__delete-confirm-modal-content,.gifthunt-form__test-mail-modal-content,.gifthunt-form__delete-hunter-confirm-modal-content,.gifthunt-form__success-email-template-preview-modal-content{background:#fff;border-radius:3px;-webkit-box-shadow:0 10px 20px rgba(0,0,0,0.5);box-shadow:0 10px 20px rgba(0,0,0,0.5);margin:0 auto;max-width:500px;position:relative;width:100%}.gifthunt-form__delete-confirm-modal-content h3,.gifthunt-form__test-mail-modal-content h3,.gifthunt-form__delete-hunter-confirm-modal-content h3,.gifthunt-form__success-email-template-preview-modal-content h3{border-bottom:1px solid #eee;margin:0 0 20px 0;padding:20px}.gifthunt-form__delete-confirm-modal-content p,.gifthunt-form__test-mail-modal-content p,.gifthunt-form__delete-hunter-confirm-modal-content p,.gifthunt-form__success-email-template-preview-modal-content p{border-bottom:1px solid #eee;margin:0 0 20px 0;padding:0 20px 20px}.gifthunt-form__delete-confirm-modal-content label,.gifthunt-form__delete-confirm-modal-content input,.gifthunt-form__test-mail-modal-content label,.gifthunt-form__test-mail-modal-content input,.gifthunt-form__delete-hunter-confirm-modal-content label,.gifthunt-form__delete-hunter-confirm-modal-content input,.gifthunt-form__success-email-template-preview-modal-content label,.gifthunt-form__success-email-template-preview-modal-content input{margin:0 20px}.gifthunt-form__delete-confirm-modal-content input,.gifthunt-form__test-mail-modal-content input,.gifthunt-form__delete-hunter-confirm-modal-content input,.gifthunt-form__success-email-template-preview-modal-content input{margin-bottom:10px}.gifthunt-form__delete-confirm-modal__close-button,.gifthunt-form__test-mail-modal__close-button,.gifthunt-form__delete-hunter-confirm-modal__close-button,.gifthunt-form__success-email-template-preview-modal__close-button{background:none;border:none;cursor:pointer;font-size:18px;height:30px;position:absolute;right:0;top:0;width:30px}.gifthunt-form__delete-confirm-actions,.gifthunt-form__test-mail-actions{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0 20px 20px}.gifthunt-form__delete-confirm-modal.hidden,.gifthunt-form__test-mail-modal.hidden,.gifthunt-form__delete-hunter-confirm-modal.hidden,.gifthunt-form__success-email-template-preview-modal.hidden{display:none}.gifthunt-form__popup-design-preview-modal{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:rgba(0,0,0,0.8);display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;left:0;overflow-y:scroll;position:fixed;top:0;width:100%;z-index:99999}.gifthunt-form__popup-design-preview-modal img{border-radius:3px;-webkit-box-shadow:0px 0px 30px rgba(0,0,0,0.8);box-shadow:0px 0px 30px rgba(0,0,0,0.8);cursor:pointer}.gifthunt-form__popup-design-preview-modal.hidden{display:none}.gifthunt-form__success-email-template-preview-modal-body{border-bottom:1px solid #eee;margin-bottom:15px;padding:0 15px 15px}.gifthunt-form__success-email-template-preview-modal-body img{width:100%}.gifthunt-card{background:#fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);box-shadow:0 1px 1px rgba(0,0,0,0.04);margin:10px 0;padding:0}.gifthunt-card__columns{display:-webkit-box;display:-ms-flexbox;display:flex}.gifthunt-card__column{-webkit-box-flex:1;-ms-flex:1;flex:1;padding:0 20px 0 0}.gifthunt-card__column:last-child{padding-right:0}.gifthunt-card__title{margin:0;padding:0}.gifthunt-card__section{border-bottom:1px solid #eee;padding:20px}.gifthunt-card__section--secondary{background:#f5f5f5;border-bottom:1px solid #e3e3e3}.gifthunt-card__section--closed,.gifthunt-card__section--opened{padding:0}.gifthunt-card__section--closed .gifthunt-form-group__label,.gifthunt-card__section--opened .gifthunt-form-group__label{padding:10px 0 10px 10px}.gifthunt-card__section--closed .gifthunt-form-group__label span,.gifthunt-card__section--opened .gifthunt-form-group__label span{display:inline-block;margin-right:10px}.gifthunt-card__section--closed .gifthunt-form-group__body,.gifthunt-card__section--opened .gifthunt-form-group__body{padding:20px}.gifthunt-card__section--closed .gifthunt-form-group__label{background:#ebebeb;border-bottom:1px solid #eee}.gifthunt-card__section--closed .gifthunt-form-group__body{display:none}.gifthunt-card__section--opened .gifthunt-form-group__label{background:#f5f5f5;border-bottom:1px solid #eee}.gifthunt-card__section--opened .gifthunt-form-group__label span{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.gifthunt-card__section--opened .gifthunt-form-group__body{display:block}.gifthunt-card__section:last-child{border-bottom:none}.gifthunt-form-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:0 auto 1.5rem}.gifthunt-form-group__label{cursor:pointer;font-size:.9rem;font-weight:bold;line-height:2rem}.gifthunt-form-group label{cursor:pointer;line-height:2rem}.gifthunt-form-group input[type="text"],.gifthunt-form-group input[type="email"],.gifthunt-form-group input[type="number"],.gifthunt-form-group input[type="url"]{height:2.5rem;line-height:2.5rem}.gifthunt-form-group input::-webkit-input-placeholder{color:#c2c2c2;font-style:italic}.gifthunt-form-group input:-ms-input-placeholder{color:#c2c2c2;font-style:italic}.gifthunt-form-group input::-ms-input-placeholder{color:#c2c2c2;font-style:italic}.gifthunt-form-group input::placeholder{color:#c2c2c2;font-style:italic}.gifthunt-form-group input.gifthunt-field-error{background-color:#fbeae5;border-color:#bf0711}.gifthunt-form-group textarea.gifthunt-field-error{background-color:#fbeae5;border-color:#bf0711}.gifthunt-form-group__help-text{color:#888;margin:.5rem 0;padding:0}.gifthunt-form-group__body label{display:block}.gifthunt-form-group:last-child{margin-bottom:0}.gifthunt-input-group{display:-webkit-box;display:-ms-flexbox;display:flex}.gifthunt-input-group input{-webkit-box-flex:1;-ms-flex:1;flex:1}.gifthunt-input-group button{height:2.5rem !important;line-height:2.5rem !important;margin-left:20px !important;color:#bf0711 !important}.gifthunt--hidden{display:none}.gifthunt-page-actions{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-top:1px solid #ccc;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin:20px 0;max-width:900px;padding:20px 0}.gifthunt-page-actions--header{border-top:none;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;margin:0;padding:10px 0}.gifthunt-page-actions--header .button{margin-left:20px}.gifthunt-page-actions--header h1{width:100%}.gifthunt-page-actions--header h1 small{font-size:13px}.gifthunt-button i{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;height:100%}.gifthunt-button i svg{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.gifthunt-button i.hidden{display:none}.gifthunt-button--link{color:#888;line-height:3rem;text-decoration:none}.gifthunt-button--danger{background:#bf0711 !important;border-color:#bf0711 !important;color:#fff !important}.gifthunt-button--danger:hover{background:#a1030b !important;border-color:#6d0308 !important}.gifthunt-button--danger:disabled.button,.gifthunt-button--danger[disabled].button{background:#a1030b !important;border-color:#6d0308 !important;color:#fff !important;text-shadow:none !important;opacity:.8}.gifthunt-error-message{color:#bf0711;line-height:1.5rem}.gifthunt-accordion{border:1px solid #eee}.gifthunt-accordion__title{background:#ebebeb;border-bottom:1px solid #eee;color:#555;cursor:pointer;font-size:14px;font-weight:700;line-height:40px;margin:0;padding:0 0 0 10px}.gifthunt-accordion__title span{display:inline-block;margin-right:5px}.gifthunt-accordion__info{border-bottom:1px solid #eee;color:#888;margin:-15px -15px 10px;padding:.5rem 1rem}.gifthunt-accordion__body{display:none;padding:15px}.gifthunt-accordion__section--active .gifthunt-accordion__title{background:#f5f5f5;cursor:default;font-weight:400}.gifthunt-accordion__section--active .gifthunt-accordion__title span{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.gifthunt-accordion__section--active .gifthunt-accordion__body{display:block}#gifthunt-send-test-success-email{max-width:140px}#gifthunt-success-email-list{list-style-type:square;margin-left:20px}#gifthunt-success-email-list li{margin-bottom:20px}#gifthunt-success-email-list li span{font-family:'Courier New', Courier, monospace}#gifthunt__icon-list{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}#gifthunt__icon-list label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:10px 10px 10px 0}#gifthunt__icon-list label .gifthunt-icon-preview{border:2px solid #eee;border-radius:3px;display:block;height:70px;margin:10px auto;width:70px}#gifthunt__icon-list label .gifthunt-icon-preview img{max-width:70px;width:100%}#gifthunt__icon-list label .gifthunt-icon-preview:hover{border:2px solid #ccc}#gifthunt__icon-list label input[type="radio"]:checked+.gifthunt-icon-preview{border:2px solid #007cb2}#gifthunt__icon-upload-preview label{display:none}#gifthunt__icon-upload-preview img{max-width:70px}#gifthunt__icon-upload-preview input[type="radio"]:checked+.gifthunt-icon-preview{border:2px solid #007cb2}#gifthunt__icon-upload .gifthunt__icon-upload-button-column{text-align:right}#gifthunt__icon-animation-list{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}#gifthunt__icon-animation-list label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:10px 10px 10px 0}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview{border:2px solid #eee;border-radius:3px;display:block;height:70px;margin:10px auto;position:relative;width:70px}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview:hover{border:2px solid #ccc}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview span{background:#ddd;border-radius:30px;display:block;height:30px;margin:20px auto;width:30px}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .pop{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:pop;animation-name:pop}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .bounce{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:bounce;animation-name:bounce}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .shake{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:shake;animation-name:shake}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .fade_left{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:fade_left;animation-name:fade_left}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .fade_right{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:fade_right;animation-name:fade_right}#gifthunt__icon-animation-list label input[type="radio"]:checked+.gifthunt-icon-animation-preview{border:2px solid #007cb2}#gifthunt__icon-animation-list label input[type="radio"]:checked+.gifthunt-icon-animation-preview span{background:#555}#gifthunt__popup-design-list{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}#gifthunt__popup-design-list label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:10px 10px 10px 0}#gifthunt__popup-design-list label .gifthunt-popup-design-preview{border:2px solid #eee;border-radius:3px;display:block;height:120px;margin:10px auto;padding:5px;position:relative;width:80px}#gifthunt__popup-design-list label .gifthunt-popup-design-preview:hover{border:2px solid #ccc}#gifthunt__popup-design-list label .gifthunt-popup-design-preview img{width:100%}#gifthunt__popup-design-list label input[type="radio"]:checked+.gifthunt-popup-design-preview{border:2px solid #007cb2}#gifthunt__popup-design-list label input[type="radio"]:checked+.gifthunt-popup-design-preview span{background:#555}#gifthunt__success-email-template-list{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}#gifthunt__success-email-template-list label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:10px 10px 10px 0}#gifthunt__success-email-template-list label .gifthunt-success-email-template-preview{border:2px solid #eee;border-radius:3px;display:block;height:55px;margin:10px auto;padding:5px;position:relative;width:80px}#gifthunt__success-email-template-list label .gifthunt-success-email-template-preview:hover{border:2px solid #ccc}#gifthunt__success-email-template-list label .gifthunt-success-email-template-preview img{width:100%}#gifthunt__success-email-template-list label input[type="radio"]:checked+.gifthunt-popup-design-preview{border:2px solid #007cb2}#gifthunt__success-email-template-list label input[type="radio"]:checked+.gifthunt-popup-design-preview span{background:#555}@-webkit-keyframes pop{0%{-webkit-transform:scale(0, 0);transform:scale(0, 0)}10%{-webkit-transform:scale(1.5, 1.5);transform:scale(1.5, 1.5)}15%{-webkit-transform:scale(0.5, 0.5);transform:scale(0.5, 0.5)}20%{-webkit-transform:scale(1.2, 1.2);transform:scale(1.2, 1.2)}25%{-webkit-transform:scale(0.8, 0.8);transform:scale(0.8, 0.8)}30%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}89%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}90%{-webkit-transform:scale(1.2, 1.2);transform:scale(1.2, 1.2)}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}}@keyframes pop{0%{-webkit-transform:scale(0, 0);transform:scale(0, 0)}10%{-webkit-transform:scale(1.5, 1.5);transform:scale(1.5, 1.5)}15%{-webkit-transform:scale(0.5, 0.5);transform:scale(0.5, 0.5)}20%{-webkit-transform:scale(1.2, 1.2);transform:scale(1.2, 1.2)}25%{-webkit-transform:scale(0.8, 0.8);transform:scale(0.8, 0.8)}30%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}89%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}90%{-webkit-transform:scale(1.2, 1.2);transform:scale(1.2, 1.2)}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}}@-webkit-keyframes bounce{0%{margin-top:20px}5%{margin-top:0px}10%{margin-top:20px}15%{margin-top:5px}20%{margin-top:20px}25%{margin-top:10px}30%{margin-top:20px}35%{margin-top:15px}40%{margin-top:20px}}@keyframes bounce{0%{margin-top:20px}5%{margin-top:0px}10%{margin-top:20px}15%{margin-top:5px}20%{margin-top:20px}25%{margin-top:10px}30%{margin-top:20px}35%{margin-top:15px}40%{margin-top:20px}}@-webkit-keyframes shake{0%{margin-left:20px}5%{margin-left:5px}10%{margin-left:35px}15%{margin-left:10px}20%{margin-left:30px}25%{margin-left:15px}30%{margin-left:25px}35%{margin-left:20px}}@keyframes shake{0%{margin-left:20px}5%{margin-left:5px}10%{margin-left:35px}15%{margin-left:10px}20%{margin-left:30px}25%{margin-left:15px}30%{margin-left:25px}35%{margin-left:20px}}@-webkit-keyframes fade_left{0%{margin-left:0;opacity:0}30%{margin-left:25px;opacity:1}35%{margin-left:20px}}@keyframes fade_left{0%{margin-left:0;opacity:0}30%{margin-left:25px;opacity:1}35%{margin-left:20px}}@-webkit-keyframes fade_right{0%{margin-left:40px;opacity:0}30%{margin-left:15px;opacity:1}35%{margin-left:20px}}@keyframes fade_right{0%{margin-left:40px;opacity:0}30%{margin-left:15px;opacity:1}35%{margin-left:20px}}@media only screen and (max-width: 600px){.gifthunt-card__columns{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.gifthunt-card__column{padding:0}}.gifthunt-spin{-webkit-animation:gifthunt_spin_animation 1s linear infinite;animation:gifthunt_spin_animation 1s linear infinite}@-webkit-keyframes gifthunt_spin_animation{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes gifthunt_spin_animation{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.gifthunt-hunters-list .gifthunt-page-actions{max-width:100%}.gifthunt-hunters-list .gifthunt-page-actions--secondary{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.gifthunt-hunters-list .gifthunt-page-actions--secondary .button{margin-left:20px}.gifthunt-hunters-list .gifthunt-page-actions--header{padding-bottom:0}.gifthunt-hunters-list .button-delete-hunter{font-weight:bold}.gifthunt-hunters-list .subsubsub{margin:0 0 10px}.gifthunt-hunters-list__empty-state{clear:both;color:#888;display:block;font-size:16px;font-style:italic;padding:10px 0;text-align:center}.info--premium{background:#fff5de;padding:10px;border-radius:3px;border:1px solid #e8b646;text-decoration:none;color:#555}.info--premium a{color:#9f700b;font-weight:bold}@media (min-width: 782px){body.js.is-fullscreen-mode .edit-post-header{-webkit-transform:translateY(-100%);transform:translateY(-100%);-webkit-animation:edit-post-fullscreen-mode__slide-in-animation 0.1s forwards;animation:edit-post-fullscreen-mode__slide-in-animation 0.1s forwards}}@media (min-width: 782px) and (prefers-reduced-motion: reduce){body.js.is-fullscreen-mode .edit-post-header{-webkit-animation-duration:1ms !important;animation-duration:1ms !important}}@-webkit-keyframes edit-post-fullscreen-mode__slide-in-animation{100%{-webkit-transform:translateY(0%);transform:translateY(0%)}}@keyframes edit-post-fullscreen-mode__slide-in-animation{100%{-webkit-transform:translateY(0%);transform:translateY(0%)}}.edit-post-header{height:50px;padding:0;background:#f1f1f1;display:-webkit-box;display:-ms-flexbox;display:flex;z-index:1100;left:0;right:0;top:0;position:-webkit-sticky;position:sticky}@media (min-width: 600px){.edit-post-header{position:fixed;padding:5px 20px;top:46px}}@media (min-width: 782px){.edit-post-header{top:32px}body.is-fullscreen-mode .edit-post-header{top:0}}.edit-post-header .editor-post-switch-to-draft+.editor-post-preview{display:none}@media (min-width: 600px){.edit-post-header .editor-post-switch-to-draft+.editor-post-preview{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}}.edit-post-header>.edit-post-header__settings{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}@supports ((position: -webkit-sticky) or (position: sticky)){.edit-post-header>.edit-post-header__settings{-webkit-box-ordinal-group:initial;-ms-flex-order:initial;order:initial}}.edit-post-header{left:0}@media (min-width: 782px){.edit-post-header{left:160px}}@media (min-width: 782px){.auto-fold .edit-post-header{left:36px}}@media (min-width: 960px){.auto-fold .edit-post-header{left:160px}}.folded .edit-post-header{left:0}@media (min-width: 782px){.folded .edit-post-header{left:36px}}@media (max-width: 782px){.auto-fold .wp-responsive-open .edit-post-header{left:190px}}@media (max-width: 600px){.auto-fold .wp-responsive-open .edit-post-header{margin-left:-18px}}body.is-fullscreen-mode .edit-post-header{left:0 !important}.edit-post-header__settings{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.edit-post-header .components-button.is-toggled{color:#fff;background:#555d66;margin:1px;padding:7px}.edit-post-header .components-button.is-toggled:hover,.edit-post-header .components-button.is-toggled:focus{-webkit-box-shadow:0 0 0 1px #555d66, inset 0 0 0 1px #fff !important;box-shadow:0 0 0 1px #555d66, inset 0 0 0 1px #fff !important;color:#fff !important;background:#555d66 !important}.edit-post-header .components-button.editor-post-save-draft,.edit-post-header .components-button.editor-post-switch-to-draft,.edit-post-header .components-button.editor-post-preview,.edit-post-header .components-button.editor-post-publish-button,.edit-post-header .components-button.editor-post-publish-panel__toggle{margin:2px;height:33px;line-height:32px;font-size:13px}.edit-post-header .components-button.editor-post-save-draft,.edit-post-header .components-button.editor-post-switch-to-draft{padding:0 5px}@media (min-width: 600px){.edit-post-header .components-button.editor-post-save-draft,.edit-post-header .components-button.editor-post-switch-to-draft{padding:0 12px}}.edit-post-header .components-button.editor-post-preview,.edit-post-header .components-button.editor-post-publish-button,.edit-post-header .components-button.editor-post-publish-panel__toggle{padding:0 5px 2px}@media (min-width: 600px){.edit-post-header .components-button.editor-post-preview,.edit-post-header .components-button.editor-post-publish-button,.edit-post-header .components-button.editor-post-publish-panel__toggle{padding:0 12px 2px}}@media (min-width: 782px){.edit-post-header .components-button.editor-post-preview{margin:0 3px 0 12px}.edit-post-header .components-button.editor-post-publish-button,.edit-post-header .components-button.editor-post-publish-panel__toggle{margin:0 12px 0 3px}}.edit-post-fullscreen-mode-close__toolbar{display:none}@media (min-width: 782px){.edit-post-fullscreen-mode-close__toolbar{display:block;border-top:0;border-bottom:0;border-left:0;margin:-9px 10px -9px -10px;padding:9px 10px}}.edit-post-header-toolbar{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.edit-post-header-toolbar>.components-button{display:none}@media (min-width: 600px){.edit-post-header-toolbar>.components-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}}.edit-post-header-toolbar .block-editor-block-navigation,.edit-post-header-toolbar .table-of-contents{display:none}@media (min-width: 600px){.edit-post-header-toolbar .block-editor-block-navigation,.edit-post-header-toolbar .table-of-contents{display:-webkit-box;display:-ms-flexbox;display:flex}}.edit-post-header-toolbar__block-toolbar{position:absolute;top:56px;left:0;right:0;background:#fff;min-height:37px;border-bottom:1px solid #e2e4e7}.edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar .components-toolbar{border-top:none;border-bottom:none}.is-sidebar-opened .edit-post-header-toolbar__block-toolbar{display:none}@media (min-width: 782px){.is-sidebar-opened .edit-post-header-toolbar__block-toolbar{display:block;right:280px}}@media (min-width: 1080px){.edit-post-header-toolbar__block-toolbar{padding-left:8px;position:static;left:auto;right:auto;background:none;border-bottom:none;min-height:auto}.is-sidebar-opened .edit-post-header-toolbar__block-toolbar{right:auto}.edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar{margin:-9px 0}.edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar .components-toolbar{padding:10px 4px 9px}}
  • gift-hunt/tags/1.0.1/assets/scripts/gifthunt.js

    r2280169 r2409806  
    22 * Datepickers - visible from and to fields
    33 */
    4 jQuery(document).ready(function(){
    5   jQuery('#visible_from').datepicker({
    6     dateFormat : 'yy-mm-dd',
    7     minDate: 0
    8   });
    9 
    10   jQuery('#visible_to').datepicker({
    11     dateFormat : 'yy-mm-dd',
    12     minDate: 0
    13   });
     4jQuery(document).ready(function () {
     5    jQuery("#visible_from").datepicker({
     6        dateFormat: "yy-mm-dd",
     7        minDate: 0,
     8    });
     9
     10    jQuery("#visible_to").datepicker({
     11        dateFormat: "yy-mm-dd",
     12        minDate: 0,
     13    });
    1414});
    1515
     
    1717 * Show - hide elements on value change
    1818 */
    19 document.querySelectorAll("input[name='display_type']").forEach(displayTypeRadio => {
    20   displayTypeRadio.addEventListener("change", toggleDisplayTypeFields);
    21 });
    22 
    23 function toggleDisplayTypeFields(){
    24   if(this.value == "time"){
    25     // hide pageview section
    26     document.querySelector("#pageview_to_display_section").classList.add("hidden");
    27     // display time section
    28     document.querySelector("#time_to_display_section").classList.remove("hidden");
    29   } else {
    30     // hide time section
    31     document.querySelector("#time_to_display_section").classList.add("hidden");
    32     // display pageview section
    33     document.querySelector("#pageview_to_display_section").classList.remove("hidden");
    34   }
     19document.querySelectorAll("input[name='display_type']").forEach((displayTypeRadio) => {
     20    displayTypeRadio.addEventListener("change", toggleDisplayTypeFields);
     21});
     22
     23function toggleDisplayTypeFields() {
     24    if (this.value == "time") {
     25        // hide pageview section
     26        document.querySelector("#pageview_to_display_section").classList.add("hidden");
     27        // display time section
     28        document.querySelector("#time_to_display_section").classList.remove("hidden");
     29    } else {
     30        // hide time section
     31        document.querySelector("#time_to_display_section").classList.add("hidden");
     32        // display pageview section
     33        document.querySelector("#pageview_to_display_section").classList.remove("hidden");
     34    }
    3535}
    3636
    3737document.querySelector("#form_collect_first_name").addEventListener("change", (e) => {
    38   if(e.target.checked){
    39     // display first name label field
    40     document.querySelector("#form_label_first_name_section").classList.remove("hidden");
    41   } else {
    42     // hide first name label field
    43     document.querySelector("#form_label_first_name_section").classList.add("hidden");
    44   }
     38    if (e.target.checked) {
     39        // display first name label field
     40        document.querySelector("#form_label_first_name_section").classList.remove("hidden");
     41    } else {
     42        // hide first name label field
     43        document.querySelector("#form_label_first_name_section").classList.add("hidden");
     44    }
    4545});
    4646
    4747document.querySelector("#form_collect_last_name").addEventListener("change", (e) => {
    48   if(e.target.checked){
    49     // display last name label field
    50     document.querySelector("#form_label_last_name_section").classList.remove("hidden");
    51   } else {
    52     // hide last name label field
    53     document.querySelector("#form_label_last_name_section").classList.add("hidden");
    54   }
     48    if (e.target.checked) {
     49        // display last name label field
     50        document.querySelector("#form_label_last_name_section").classList.remove("hidden");
     51    } else {
     52        // hide last name label field
     53        document.querySelector("#form_label_last_name_section").classList.add("hidden");
     54    }
    5555});
    5656
    5757document.querySelector("#form_collect_additional_information").addEventListener("change", (e) => {
    58   if(e.target.checked){
    59     // display additional information label field
    60     document.querySelector("#form_label_additional_information_section").classList.remove("hidden");
    61   } else {
    62     // hide additional information label field
    63     document.querySelector("#form_label_additional_information_section").classList.add("hidden");
    64   }
    65 });
    66 
    67 document.querySelectorAll("input[name='gift_type']").forEach(giftType => {
    68   giftType.addEventListener("change", toggelGiftSections);
    69 });
    70 
    71 function toggelGiftSections(){
    72   if(this.value == "oneMany"){
    73     // hide more gifts section
    74     document.querySelector("#gifthunt-card--more-gifts").classList.add("hidden");
    75     // display one gift section
    76     document.querySelector("#gifthunt-card--one-gift").classList.remove("hidden");
    77   } else {
    78     // hide one gift section
    79     document.querySelector("#gifthunt-card--one-gift").classList.add("hidden");
    80     // display more gifts section
    81     document.querySelector("#gifthunt-card--more-gifts").classList.remove("hidden");
    82   }
     58    if (e.target.checked) {
     59        // display additional information label field
     60        document.querySelector("#form_label_additional_information_section").classList.remove("hidden");
     61    } else {
     62        // hide additional information label field
     63        document.querySelector("#form_label_additional_information_section").classList.add("hidden");
     64    }
     65});
     66
     67document.querySelector("#success_email_send").addEventListener("change", (e) => {
     68    if (e.target.checked) {
     69        // show success email settings sections
     70        document.querySelectorAll(".success-email-section").forEach((section) => {
     71            section.classList.remove("hidden");
     72        });
     73    } else {
     74        // hide success email settings sections
     75        document.querySelectorAll(".success-email-section").forEach((section) => {
     76            section.classList.add("hidden");
     77        });
     78    }
     79});
     80
     81document.querySelectorAll("input[name='gift_type']").forEach((giftType) => {
     82    giftType.addEventListener("change", toggelGiftSections);
     83});
     84
     85function toggelGiftSections() {
     86    if (this.value == "oneMany") {
     87        // hide more gifts section
     88        document.querySelector("#gifthunt-card--more-gifts").classList.add("hidden");
     89        // display one gift section
     90        document.querySelector("#gifthunt-card--one-gift").classList.remove("hidden");
     91    } else {
     92        // hide one gift section
     93        document.querySelector("#gifthunt-card--one-gift").classList.add("hidden");
     94        // display more gifts section
     95        document.querySelector("#gifthunt-card--more-gifts").classList.remove("hidden");
     96    }
    8397}
    8498
    8599document.querySelector("#active").addEventListener("change", (e) => {
    86   if(e.target.checked){
    87     // display date fields
    88     document.querySelector("#visible-from-section").classList.remove("hidden");
    89     document.querySelector("#visible-to-section").classList.remove("hidden");
    90   } else {
    91     // hide date fields
    92     document.querySelector("#visible-from-section").classList.add("hidden");
    93     document.querySelector("#visible-to-section").classList.add("hidden");
    94   }
     100    if (e.target.checked) {
     101        // display date fields
     102        document.querySelector("#visible-from-section").classList.remove("hidden");
     103        document.querySelector("#visible-to-section").classList.remove("hidden");
     104    } else {
     105        // hide date fields
     106        document.querySelector("#visible-from-section").classList.add("hidden");
     107        document.querySelector("#visible-to-section").classList.add("hidden");
     108    }
    95109});
    96110
     
    100114document.querySelector("#gifthunt-add-gift-button").addEventListener("click", addNewGiftField);
    101115
    102 function addNewGiftField(){
    103   // get highest gift index
    104   let giftIndex = 1;
    105   document.querySelectorAll("#gifthunt-card__section--gift-list .gift-item").forEach(giftItem => {
    106     const currentIndex = parseInt(giftItem.dataset.giftId);
    107     if(currentIndex >= giftIndex){
    108       giftIndex = currentIndex + 1;
    109     }
    110   });
    111  
    112   let giftFieldTemplate = document.querySelector("#gift-field-template").textContent.replace(/%GIFTID%/gi, giftIndex).replace(/%GIFTDBID%/gi, "0").replace(/%GIFTGIFT%/gi, "");
    113   let newField = document.createRange().createContextualFragment(giftFieldTemplate);
    114 
    115   document.querySelector("#gifthunt-card__section--gift-list").appendChild(newField);
     116function addNewGiftField() {
     117    // get highest gift index
     118    let giftIndex = 1;
     119    document.querySelectorAll("#gifthunt-card__section--gift-list .gift-item").forEach((giftItem) => {
     120        const currentIndex = parseInt(giftItem.dataset.giftId);
     121        if (currentIndex >= giftIndex) {
     122            giftIndex = currentIndex + 1;
     123        }
     124    });
     125
     126    let giftFieldTemplate = document
     127        .querySelector("#gift-field-template")
     128        .textContent.replace(/%GIFTID%/gi, giftIndex)
     129        .replace(/%GIFTDBID%/gi, "0")
     130        .replace(/%GIFTGIFT%/gi, "");
     131    let newField = document.createRange().createContextualFragment(giftFieldTemplate);
     132
     133    document.querySelector("#gifthunt-card__section--gift-list").appendChild(newField);
    116134}
    117135
     
    120138 */
    121139document.addEventListener("click", (e) => {
    122   if(e.target.classList.contains("gifthunt__gift-item-remove-button")){
    123     document.querySelector(`#gift-item-${e.target.dataset.giftId}`).remove();
    124   }
     140    if (e.target.classList.contains("gifthunt__gift-item-remove-button")) {
     141        document.querySelector(`#gift-item-${e.target.dataset.giftId}`).remove();
     142    }
    125143});
    126144
     
    129147 */
    130148const gifthuntRequiredFields = document.querySelectorAll("form [required]");
    131 gifthuntRequiredFields.forEach(requiredField => {
     149gifthuntRequiredFields.forEach((requiredField) => {
    132150    valueCheck(requiredField);
    133151    requiredField.addEventListener("blur", () => valueCheck(requiredField));
    134152});
    135153
    136 function valueCheck(element){
    137     if(!element.value){
    138     if(element.classList.contains("gifthunt-field-error")){
    139       return;
    140     }
     154function valueCheck(element) {
     155    if (!element.value) {
     156        if (element.classList.contains("gifthunt-field-error")) {
     157            return;
     158        }
    141159
    142160        // display error message
     
    151169    } else {
    152170        // remove error message if exists
    153         if(document.querySelector(`#gifthunt-error-message-${element.id}`)){
     171        if (document.querySelector(`#gifthunt-error-message-${element.id}`)) {
    154172            element.classList.remove("gifthunt-field-error");
    155173            document.querySelector(`#gifthunt-error-message-${element.id}`).remove();
     
    161179 * Display or hide error for empty editors
    162180 */
    163 function toggleEditorError(editorId, action){
    164   if(action == "display"){
    165     // display editor error message
    166     document.querySelector(`#${editorId}-error-message`).classList.remove("hidden");
    167   } else {
    168     // hide editor error message
    169     document.querySelector(`#${editorId}-error-message`).classList.add("hidden");
    170   }
    171 }
    172 
    173 function toggleIconError(action){
    174   if(action == "display"){
    175     document.querySelector("#icon_error-message").classList.remove("hidden");
    176   } else {
    177     document.querySelector("#icon_error-message").classList.add("hidden");
    178   }
    179 }
    180 
    181 function toggleGiftTypeError(action){
    182   if(action == "display"){
    183     document.querySelector("#gift_type-error-message").classList.remove("hidden");
    184   } else {
    185     document.querySelector("#gift_type-error-message").classList.add("hidden");
    186   }
     181function toggleEditorError(editorId, action) {
     182    if (action == "display") {
     183        // display editor error message
     184        document.querySelector(`#${editorId}-error-message`).classList.remove("hidden");
     185    } else {
     186        // hide editor error message
     187        document.querySelector(`#${editorId}-error-message`).classList.add("hidden");
     188    }
     189}
     190
     191function toggleIconError(action) {
     192    if (action == "display") {
     193        document.querySelector("#icon_error-message").classList.remove("hidden");
     194    } else {
     195        document.querySelector("#icon_error-message").classList.add("hidden");
     196    }
     197}
     198
     199function toggleGiftTypeError(action) {
     200    if (action == "display") {
     201        document.querySelector("#gift_type-error-message").classList.remove("hidden");
     202    } else {
     203        document.querySelector("#gift_type-error-message").classList.add("hidden");
     204    }
    187205}
    188206
     
    190208 * Check if the form is ready to save
    191209 */
    192 function checkReadyToSave(){
    193   let gifthuntSessionData = {};
    194   let errorCount = 0;
    195   let errorMessages = [];
    196  
    197   // check basic fields
    198   const requiredBasicFields = ["#name", "#popup_title", "#form_label_email", "#form_label_legal", "#form_legal_url", "#popup_button", "#success_email_sender_name", "#success_email_sender_email", "#success_email_subject"];
    199  
    200   requiredBasicFields.forEach(requiredField => {
    201     const currentField = document.querySelector(requiredField);
    202     if(!currentField.value){
    203       errorCount++;
    204       valueCheck(currentField);
    205       errorMessages.push(currentField.dataset.gifthuntError);
    206     } else {
    207       valueCheck(currentField);
    208     }
    209 
    210     gifthuntSessionData[currentField.id] = currentField.value;
    211   });
    212 
    213   // check wysiwyg fields
    214   const requiredEditorFields = ["popup_body", "popup_submit_body", "success_email_body"];
    215   requiredEditorFields.forEach(requiredField => {
    216     let currentValue = "";
    217     if(tinyMCE.editors[requiredField]){
    218       /**
    219        * Visual editor
    220        */
    221       currentValue = tinyMCE.editors[requiredField].getContent();
    222     } else {
    223       /**
    224        * Text editor
    225        */
    226       currentValue = document.querySelector(`#${requiredField}`).value;
    227     }
    228 
    229     gifthuntSessionData[requiredField] = currentValue;
    230 
    231     if(currentValue.replace(/<[^>]*>?/gm, '') == ""){
    232       errorCount++;
    233       toggleEditorError(requiredField, "display");
    234       errorMessages.push(document.querySelector(`#${requiredField}-error-message`).textContent);
    235     } else {
    236       toggleEditorError(requiredField, "hide");
    237     }
    238   });
    239 
    240   // check session icon
    241   const icon = document.querySelector("input[name='icon']:checked");
    242   const customIcon = document.querySelector("#custom_icon");
    243   if(!icon){
    244     errorCount++;
    245     toggleIconError("display");
    246     errorMessages.push(document.querySelector("#icon_error-message").textContent);
    247   } else {
    248     toggleIconError("hide");
    249     gifthuntSessionData["icon"] = icon.value;
    250 
    251     if(gifthuntSessionData["icon"] == 99){
    252       // custom icon, check uploaded file
    253       if(customIcon.value == ""){
    254         errorCount++;
    255         toggleIconError("display");
    256       } else {
    257         toggleIconError("hide");
    258         gifthuntSessionData["custom_icon"] = customIcon.value;
    259       }
    260     }
    261   }
    262 
    263   // check fields with logic
    264   const displayType = document.querySelector("input[name='display_type']:checked").value;
    265   if(displayType == "time"){
    266     // check time field
    267     const timeToDisplay = document.querySelector("#time_to_display");
    268     if(!timeToDisplay.value){
    269       errorCount++;
    270       valueCheck(timeToDisplay);
    271       errorMessages.push(timeToDisplay.dataset.gifthuntError);
    272     } else {
    273       gifthuntSessionData["time_to_display"] = timeToDisplay.value;
    274       gifthuntSessionData["display_type"] = "time";
    275     }
    276 
    277     // add default value to pageview field
    278     document.querySelector("#pageview_to_display").value = "5";
    279   } else {
    280     // check pageview field
    281     const pageViewToDisplay = document.querySelector("#pageview_to_display");
    282     if(!pageViewToDisplay.value){
    283       errorCount++;
    284       valueCheck(pageViewToDisplay);
    285       errorMessages.push(pageViewToDisplay.dataset.gifthuntError);
    286     } else {
    287       gifthuntSessionData["pageview_to_display"] = pageViewToDisplay.value;
    288       gifthuntSessionData["display_type"] = "pageview";
    289     }
    290 
    291     // add default value to time field
    292     document.querySelector("#time_to_display").value = "90";
    293   }
    294 
    295   // check gift type
    296   const giftType = document.querySelector("input[name='gift_type']:checked");
    297   if(!giftType){
    298     errorCount++;
    299     toggleGiftTypeError("display");
    300     errorMessages.push(document.querySelector("#gift_type-error-message").textContent);
    301   } else {
    302     toggleGiftTypeError("hide");
    303     gifthuntSessionData["gift_type"] = giftType.value;
    304   }
    305 
    306   // check gifts based on gift type
    307   if(gifthuntSessionData["gift_type"] && gifthuntSessionData["gift_type"] == "oneMany"){
    308     // one gift for everyone
    309     const gift = document.querySelector("#gift");
    310     if(!gift.value){
    311       errorCount++;
    312       valueCheck(gift);
    313       errorMessages.push(gift.dataset.gifthuntError);
    314     } else {
    315       valueCheck(gift);
    316       gifthuntSessionData["gift"] = gift.value;
    317     }
    318   } else {
    319     // multiple gifts
    320     let giftItems = [];
    321     let giftItemsCount = 0;
    322     const giftsError = document.querySelector("#gifts-error-message");
    323 
    324     document.querySelectorAll(".gift-item").forEach(giftItem => {
    325       const currentGiftItem = giftItem.querySelector("input");
    326       if(currentGiftItem.value){
    327         giftItems.push({
    328           value: currentGiftItem.value,
    329           dbid: currentGiftItem.dataset.giftDbId
    330         });
    331 
    332         giftItemsCount++;
    333       }
    334     });
    335 
    336     if(!giftItemsCount){
    337       errorCount++;
    338       errorMessages.push(giftsError.textContent);
    339       giftsError.classList.remove("hidden");
    340     } else {
    341       gifthuntSessionData["gifts"] = giftItems;
    342       giftsError.classList.add("hidden");
    343     }
    344   }
    345 
    346   // checkbox values
    347   const checkboxFields = ["allow_multiple_collect", "form_collect_first_name", "form_collect_last_name", "form_collect_additional_information"];
    348   checkboxFields.forEach(checkboxField => {
    349     gifthuntSessionData[checkboxField] = document.querySelector(`#${checkboxField}`).checked ? 1 : 0;
    350   });
    351 
    352   // check values for selected checkboxes
    353   const checkboxFieldsNames = ["form_collect_first_name", "form_collect_last_name", "form_collect_additional_information"];
    354   checkboxFieldsNames.forEach(checkboxFieldName => {
    355     const currentFieldId = checkboxFieldName.replace('collect', 'label');
    356     const currentField = document.querySelector(`#${currentFieldId}`);
    357    
    358     if(gifthuntSessionData[checkboxFieldName] && !currentField.value){
    359       errorCount++;
    360       valueCheck(currentField);
    361       errorMessages.push(currentField.dataset.gifthuntError);
    362     } else {
    363       gifthuntSessionData[currentFieldId] = currentField.value;
    364       valueCheck(currentField);
    365     }
    366   });
    367 
    368   // check visibility values
    369   const active = document.querySelector("#active");
    370   gifthuntSessionData["active"] = (active.checked) ? 1 : 0;
    371 
    372   if(gifthuntSessionData["active"]){
    373     // check dates
    374     const visibleFrom = document.querySelector("#visible_from");
    375     const visibleTo = document.querySelector("#visible_to");
    376    
    377     valueCheck(visibleFrom);
    378     valueCheck(visibleTo);
    379 
    380     if(visibleFrom.value){
    381       gifthuntSessionData["visible_from"] = visibleFrom.value;
    382     } else {
    383       errorCount++;
    384       errorMessages.push("Session start date is required");
    385     }
    386 
    387     if(visibleTo.value){
    388       gifthuntSessionData["visible_to"] = visibleTo.value;
    389     } else {
    390       errorCount++;
    391       errorMessages.push("Session end date is required");
    392     }
    393   }
    394 
    395   // display validation result
    396   if(errorCount){
    397     const finalErrorMessage = errorMessages.map(errorMessage => `<li> ${errorMessage}</li>`).join('');
    398 
    399     document.querySelectorAll(".gifthunt-form-result--error").forEach(errorSection => {
    400       errorSection.querySelector(".gifthunt-form-result__content").innerHTML = `<ul>${finalErrorMessage}</ul>`;
    401       errorSection.classList.remove("hidden");
    402     });
    403 
    404     document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
    405 
    406     return;
    407   } else {
    408     document.querySelectorAll(".gifthunt-form-result").forEach(formResultSection => {
    409       formResultSection.classList.add("hidden");
    410     });
    411     document.querySelector(".gifthunt-form-result__modal").classList.add("hidden");
    412   }
    413 
    414   // display loading animation and disable button
    415   const gifthuntSaveButtons = document.querySelectorAll(".gifthunt-save-session")
    416   gifthuntSaveButtons.forEach(saveButton => {
    417     saveButton.querySelector("i").classList.remove("hidden");
    418     saveButton.disabled = true;
    419   });
    420  
    421 
    422   let gifthuntAction = "create";
    423   if(giftSessionId){
    424     gifthuntAction = "update";
    425   }
    426 
    427   gifthuntSessionData["id"] = giftSessionId;
    428 
    429   // save or update
    430   const data = {
    431     'nonce': gifthuntFreeNonce,
    432     'action': 'gifthuntfree_action',
    433     gifthuntAction,
    434     gifthuntSessionData
    435   };
    436 
    437   jQuery.post(ajaxurl, data, (response) => {
    438 
    439         if(response.status != "success"){
    440       document.querySelectorAll(".gifthunt-form-result--error").forEach(errorSection => {
    441         errorSection.querySelector(".gifthunt-form-result__content").innerHTML = response.data;
    442         errorSection.classList.remove("hidden");
    443       });
    444       document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
    445     } else {
    446       if(gifthuntAction == "create"){
    447         // redirect to session page
    448         window.location.href = `admin.php?page=gifthuntfree-sessions&p=session-edit&id=${response.data}&msg=created`;
    449         return;
    450       } else {
    451         // display session updated message
    452         document.querySelectorAll(".gifthunt-form-result--success").forEach(successSection => {
    453           successSection.querySelector(".gifthunt-form-result__content").innerHTML = response.data;
    454           successSection.classList.remove("hidden");
    455         });
    456         document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
    457 
    458         // update gifts lists with db IDs
    459         const newGiftsList = response.gifts.map((gift) => {
    460           let currentGift = gift.gift.replace(/"/g, '&quot;');
    461           let giftFieldTemplate = document.querySelector("#gift-field-template").textContent
    462                                     .replace(/%GIFTID%/gi, gift.id)
    463                                     .replace(/%GIFTDBID%/gi, gift.id)
    464                                     .replace(/%GIFTGIFT%/gi, currentGift);
    465          
    466           return giftFieldTemplate;
    467         });
    468         document.querySelector("#gifthunt-card__section--gift-list").innerHTML = newGiftsList.join('');
    469       }
    470     }
    471 
    472     gifthuntSaveButtons.forEach(saveButton => {
    473       saveButton.querySelector("i").classList.add("hidden");
    474       saveButton.disabled = false;
    475     });
     210function checkReadyToSave() {
     211    let gifthuntSessionData = {};
     212    let errorCount = 0;
     213    let errorMessages = [];
     214
     215    // check basic fields
     216    const requiredBasicFields = ["#name", "#popup_title", "#form_label_email", "#form_label_legal", "#form_legal_url", "#popup_button", "#success_email_sender_name", "#success_email_sender_email", "#success_email_subject"];
     217
     218    requiredBasicFields.forEach((requiredField) => {
     219        const currentField = document.querySelector(requiredField);
     220        if (!currentField.value) {
     221            errorCount++;
     222            valueCheck(currentField);
     223            errorMessages.push(currentField.dataset.gifthuntError);
     224        } else {
     225            valueCheck(currentField);
     226        }
     227
     228        gifthuntSessionData[currentField.id] = currentField.value;
     229    });
     230
     231    // check wysiwyg fields
     232    const requiredEditorFields = ["popup_body", "popup_submit_body", "success_email_body"];
     233    requiredEditorFields.forEach((requiredField) => {
     234        let currentValue = "";
     235        if (tinyMCE.editors[requiredField]) {
     236            /**
     237             * Visual editor
     238             */
     239            currentValue = tinyMCE.editors[requiredField].getContent();
     240        } else {
     241            /**
     242             * Text editor
     243             */
     244            currentValue = document.querySelector(`#${requiredField}`).value;
     245        }
     246
     247        gifthuntSessionData[requiredField] = currentValue;
     248
     249        if (currentValue.replace(/<[^>]*>?/gm, "") == "") {
     250            errorCount++;
     251            toggleEditorError(requiredField, "display");
     252            errorMessages.push(document.querySelector(`#${requiredField}-error-message`).textContent);
     253        } else {
     254            toggleEditorError(requiredField, "hide");
     255        }
     256    });
     257
     258    // check session icon
     259    const icon = document.querySelector("input[name='icon']:checked");
     260    const customIcon = document.querySelector("#custom_icon");
     261    if (!icon) {
     262        errorCount++;
     263        toggleIconError("display");
     264        errorMessages.push(document.querySelector("#icon_error-message").textContent);
     265    } else {
     266        toggleIconError("hide");
     267        gifthuntSessionData["icon"] = icon.value;
     268
     269        if (gifthuntSessionData["icon"] == 99) {
     270            // custom icon, check uploaded file
     271            if (customIcon.value == "") {
     272                errorCount++;
     273                toggleIconError("display");
     274            } else {
     275                toggleIconError("hide");
     276                gifthuntSessionData["custom_icon"] = customIcon.value;
     277            }
     278        }
     279    }
     280
     281    // check fields with logic
     282    const displayType = document.querySelector("input[name='display_type']:checked").value;
     283    if (displayType == "time") {
     284        // check time field
     285        const timeToDisplay = document.querySelector("#time_to_display");
     286        if (!timeToDisplay.value) {
     287            errorCount++;
     288            valueCheck(timeToDisplay);
     289            errorMessages.push(timeToDisplay.dataset.gifthuntError);
     290        } else {
     291            gifthuntSessionData["time_to_display"] = timeToDisplay.value;
     292            gifthuntSessionData["display_type"] = "time";
     293        }
     294
     295        // add default value to pageview field
     296        document.querySelector("#pageview_to_display").value = "5";
     297    } else {
     298        // check pageview field
     299        const pageViewToDisplay = document.querySelector("#pageview_to_display");
     300        if (!pageViewToDisplay.value) {
     301            errorCount++;
     302            valueCheck(pageViewToDisplay);
     303            errorMessages.push(pageViewToDisplay.dataset.gifthuntError);
     304        } else {
     305            gifthuntSessionData["pageview_to_display"] = pageViewToDisplay.value;
     306            gifthuntSessionData["display_type"] = "pageview";
     307        }
     308
     309        // add default value to time field
     310        document.querySelector("#time_to_display").value = "90";
     311    }
     312
     313    // check gift type
     314    const giftType = document.querySelector("input[name='gift_type']:checked");
     315    if (!giftType) {
     316        errorCount++;
     317        toggleGiftTypeError("display");
     318        errorMessages.push(document.querySelector("#gift_type-error-message").textContent);
     319    } else {
     320        toggleGiftTypeError("hide");
     321        gifthuntSessionData["gift_type"] = giftType.value;
     322    }
     323
     324    // check gifts based on gift type
     325    if (gifthuntSessionData["gift_type"] && gifthuntSessionData["gift_type"] == "oneMany") {
     326        // one gift for everyone
     327        const gift = document.querySelector("#gift");
     328        if (!gift.value) {
     329            errorCount++;
     330            valueCheck(gift);
     331            errorMessages.push(gift.dataset.gifthuntError);
     332        } else {
     333            valueCheck(gift);
     334            gifthuntSessionData["gift"] = gift.value;
     335        }
     336    } else {
     337        // multiple gifts
     338        let giftItems = [];
     339        let giftItemsCount = 0;
     340        const giftsError = document.querySelector("#gifts-error-message");
     341
     342        document.querySelectorAll(".gift-item").forEach((giftItem) => {
     343            const currentGiftItem = giftItem.querySelector("input");
     344            if (currentGiftItem.value) {
     345                giftItems.push({
     346                    value: currentGiftItem.value,
     347                    dbid: currentGiftItem.dataset.giftDbId,
     348                });
     349
     350                giftItemsCount++;
     351            }
     352        });
     353
     354        if (!giftItemsCount) {
     355            errorCount++;
     356            errorMessages.push(giftsError.textContent);
     357            giftsError.classList.remove("hidden");
     358        } else {
     359            gifthuntSessionData["gifts"] = giftItems;
     360            giftsError.classList.add("hidden");
     361        }
     362    }
     363
     364    // checkbox values
     365    const checkboxFields = ["allow_multiple_collect", "form_collect_first_name", "form_collect_last_name", "form_collect_additional_information", "success_email_send"];
     366    checkboxFields.forEach((checkboxField) => {
     367        gifthuntSessionData[checkboxField] = document.querySelector(`#${checkboxField}`).checked ? 1 : 0;
     368    });
     369
     370    // check values for selected checkboxes
     371    const checkboxFieldsNames = ["form_collect_first_name", "form_collect_last_name", "form_collect_additional_information"];
     372    checkboxFieldsNames.forEach((checkboxFieldName) => {
     373        const currentFieldId = checkboxFieldName.replace("collect", "label");
     374        const currentField = document.querySelector(`#${currentFieldId}`);
     375
     376        if (gifthuntSessionData[checkboxFieldName] && !currentField.value) {
     377            errorCount++;
     378            valueCheck(currentField);
     379            errorMessages.push(currentField.dataset.gifthuntError);
     380        } else {
     381            gifthuntSessionData[currentFieldId] = currentField.value;
     382            valueCheck(currentField);
     383        }
     384    });
     385
     386    // check visibility values
     387    const active = document.querySelector("#active");
     388    gifthuntSessionData["active"] = active.checked ? 1 : 0;
     389
     390    if (gifthuntSessionData["active"]) {
     391        // check dates
     392        const visibleFrom = document.querySelector("#visible_from");
     393        const visibleTo = document.querySelector("#visible_to");
     394
     395        valueCheck(visibleFrom);
     396        valueCheck(visibleTo);
     397
     398        if (visibleFrom.value) {
     399            gifthuntSessionData["visible_from"] = visibleFrom.value;
     400        } else {
     401            errorCount++;
     402            errorMessages.push("Session start date is required");
     403        }
     404
     405        if (visibleTo.value) {
     406            gifthuntSessionData["visible_to"] = visibleTo.value;
     407        } else {
     408            errorCount++;
     409            errorMessages.push("Session end date is required");
     410        }
     411    }
     412
     413    // display validation result
     414    if (errorCount) {
     415        const finalErrorMessage = errorMessages.map((errorMessage) => `<li> ${errorMessage}</li>`).join("");
     416
     417        document.querySelectorAll(".gifthunt-form-result--error").forEach((errorSection) => {
     418            errorSection.querySelector(".gifthunt-form-result__content").innerHTML = `<ul>${finalErrorMessage}</ul>`;
     419            errorSection.classList.remove("hidden");
     420        });
     421
     422        document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
     423
     424        return;
     425    } else {
     426        document.querySelectorAll(".gifthunt-form-result").forEach((formResultSection) => {
     427            formResultSection.classList.add("hidden");
     428        });
     429        document.querySelector(".gifthunt-form-result__modal").classList.add("hidden");
     430    }
     431
     432    // display loading animation and disable button
     433    const gifthuntSaveButtons = document.querySelectorAll(".gifthunt-save-session");
     434    gifthuntSaveButtons.forEach((saveButton) => {
     435        saveButton.querySelector("i").classList.remove("hidden");
     436        saveButton.disabled = true;
     437    });
     438
     439    let gifthuntAction = "create";
     440    if (giftSessionId) {
     441        gifthuntAction = "update";
     442    }
     443
     444    gifthuntSessionData["id"] = giftSessionId;
     445
     446    // save or update
     447    const data = {
     448        nonce: gifthuntFreeNonce,
     449        action: "gifthuntfree_action",
     450        gifthuntAction,
     451        gifthuntSessionData,
     452    };
     453
     454    jQuery.post(ajaxurl, data, (response) => {
     455        if (response.status != "success") {
     456            document.querySelectorAll(".gifthunt-form-result--error").forEach((errorSection) => {
     457                errorSection.querySelector(".gifthunt-form-result__content").innerHTML = response.data;
     458                errorSection.classList.remove("hidden");
     459            });
     460            document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
     461        } else {
     462            if (gifthuntAction == "create") {
     463                // redirect to session page
     464                window.location.href = `admin.php?page=gifthuntfree-sessions&p=session-edit&id=${response.data}&msg=created`;
     465                return;
     466            } else {
     467                // display session updated message
     468                document.querySelectorAll(".gifthunt-form-result--success").forEach((successSection) => {
     469                    successSection.querySelector(".gifthunt-form-result__content").innerHTML = response.data;
     470                    successSection.classList.remove("hidden");
     471                });
     472                document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
     473
     474                // update gifts lists with db IDs
     475                const newGiftsList = response.gifts.map((gift) => {
     476                    let currentGift = gift.gift.replace(/"/g, "&quot;");
     477                    let giftFieldTemplate = document
     478                        .querySelector("#gift-field-template")
     479                        .textContent.replace(/%GIFTID%/gi, gift.id)
     480                        .replace(/%GIFTDBID%/gi, gift.id)
     481                        .replace(/%GIFTGIFT%/gi, currentGift);
     482
     483                    return giftFieldTemplate;
     484                });
     485                document.querySelector("#gifthunt-card__section--gift-list").innerHTML = newGiftsList.join("");
     486            }
     487        }
     488
     489        gifthuntSaveButtons.forEach((saveButton) => {
     490            saveButton.querySelector("i").classList.add("hidden");
     491            saveButton.disabled = false;
     492        });
    476493    });
    477494}
     
    480497 * Handle form submit
    481498 */
    482 document.querySelectorAll(".gifthunt-save-session").forEach(saveButton => {
    483   saveButton.addEventListener("click", (e) => {
    484     e.preventDefault();
    485     checkReadyToSave();
    486   });
    487 });
    488 
    489 document.querySelectorAll(".gifthunt-input-field").forEach(gifthuntInputField => {
    490   gifthuntInputField.addEventListener("blur", (e) => {
    491     if(e.target.value && e.target.classList.contains("gifthunt-field-error")){
    492       e.target.classList.remove("gifthunt-field-error");
    493       e.target.parentNode.querySelector(".gifthunt-error-message").classList.add("hidden");
    494     }
    495   });
     499document.querySelectorAll(".gifthunt-save-session").forEach((saveButton) => {
     500    saveButton.addEventListener("click", (e) => {
     501        e.preventDefault();
     502        checkReadyToSave();
     503    });
     504});
     505
     506document.querySelectorAll(".gifthunt-input-field").forEach((gifthuntInputField) => {
     507    gifthuntInputField.addEventListener("blur", (e) => {
     508        if (e.target.value && e.target.classList.contains("gifthunt-field-error")) {
     509            e.target.classList.remove("gifthunt-field-error");
     510            e.target.parentNode.querySelector(".gifthunt-error-message").classList.add("hidden");
     511        }
     512    });
    496513});
    497514
     
    500517 */
    501518document.addEventListener("DOMContentLoaded", () => {
    502   const giftType = document.querySelector("input[name='gift_type']:checked");
    503   if(giftType && giftType.value == "oneMany"){
    504     // one gift for everyone
    505     const gift = document.querySelector("#gift");
    506     if(!gift.value){
    507       valueCheck(gift);
    508     } else {
    509       valueCheck(gift);
    510     }
    511   } else {
    512     // multiple gifts
    513     let giftItems = [];
    514     let giftItemsCount = 0;
    515     const giftsError = document.querySelector("#gifts-error-message");
    516  
    517     document.querySelectorAll(".gift-item").forEach(giftItem => {
    518       const currentGiftItem = giftItem.querySelector("input");
    519       if(currentGiftItem.value){
    520         giftItemsCount++;
    521       }
    522     });
    523  
    524     if(!giftItemsCount){
    525       giftsError.classList.remove("hidden");
    526     } else {
    527       giftsError.classList.add("hidden");
    528     }
    529   }
     519    const giftType = document.querySelector("input[name='gift_type']:checked");
     520    if (giftType && giftType.value == "oneMany") {
     521        // one gift for everyone
     522        const gift = document.querySelector("#gift");
     523        if (!gift.value) {
     524            valueCheck(gift);
     525        } else {
     526            valueCheck(gift);
     527        }
     528    } else {
     529        // multiple gifts
     530        let giftItems = [];
     531        let giftItemsCount = 0;
     532        const giftsError = document.querySelector("#gifts-error-message");
     533
     534        document.querySelectorAll(".gift-item").forEach((giftItem) => {
     535            const currentGiftItem = giftItem.querySelector("input");
     536            if (currentGiftItem.value) {
     537                giftItemsCount++;
     538            }
     539        });
     540
     541        if (!giftItemsCount) {
     542            giftsError.classList.remove("hidden");
     543        } else {
     544            giftsError.classList.add("hidden");
     545        }
     546    }
    530547});
    531548
     
    533550 * Close modal
    534551 */
    535 document.querySelectorAll(".gifthunt-form-result__close-button").forEach(closeButton => {
    536   closeButton.addEventListener("click", () => {
    537     document.querySelectorAll(".gifthunt-form-result__modal").forEach(gifthuntModal => {
    538       gifthuntModal.classList.add("hidden");
    539     });
    540   });
     552document.querySelectorAll(".gifthunt-form-result__close-button").forEach((closeButton) => {
     553    closeButton.addEventListener("click", () => {
     554        document.querySelectorAll(".gifthunt-form-result__modal").forEach((gifthuntModal) => {
     555            gifthuntModal.classList.add("hidden");
     556        });
     557    });
    541558});
    542559
     
    544561 * Delete session
    545562 */
    546 if(giftSessionId > 0){
    547   document.querySelector("#button--session-delete").addEventListener("click", () => {
    548     document.querySelector(".gifthunt-form__delete-confirm-modal").classList.remove("hidden");
    549   });
    550 }
    551 
     563if (giftSessionId > 0) {
     564    document.querySelector("#button--session-delete").addEventListener("click", () => {
     565        document.querySelector(".gifthunt-form__delete-confirm-modal").classList.remove("hidden");
     566    });
     567}
    552568
    553569// cancel delete
    554570document.querySelector("#button--cancel-delete").addEventListener("click", () => {
    555   document.querySelector(".gifthunt-form__delete-confirm-modal").classList.add("hidden");
     571    document.querySelector(".gifthunt-form__delete-confirm-modal").classList.add("hidden");
    556572});
    557573
    558574document.querySelector(".gifthunt-form__delete-confirm-modal__close-button").addEventListener("click", () => {
    559   document.querySelector(".gifthunt-form__delete-confirm-modal").classList.add("hidden");
     575    document.querySelector(".gifthunt-form__delete-confirm-modal").classList.add("hidden");
    560576});
    561577
    562578// confirm delete
    563579document.querySelector("#button--confirm-delete").addEventListener("click", (event) => {
    564   event.target.querySelector("i").classList.remove("hidden");
    565   event.target.disabled = true;
    566 
    567   let gifthuntAction = "delete";
    568   const data = {
    569     'nonce': gifthuntFreeNonce,
    570     'action': 'gifthuntfree_action',
    571     gifthuntAction,
    572     "id": giftSessionId
    573   };
    574 
    575   jQuery.post(ajaxurl, data, (response) => {
    576     event.target.querySelector("i").classList.add("hidden");
    577     event.target.disabled = false;
    578     document.querySelector(".gifthunt-form__delete-confirm-modal").classList.add("hidden");
    579 
    580         if(response.status != "success"){
    581       document.querySelectorAll(".gifthunt-form-result--error").forEach(errorSection => {
    582         errorSection.querySelector(".gifthunt-form-result__content").innerHTML = response.data;
    583         errorSection.classList.remove("hidden");
    584       });
    585       document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
    586     } else {
    587       // redirect to session list
    588       window.location.href = `admin.php?page=gifthuntfree-sessions&msg=deleted`;
    589       return;
    590     }
     580    event.target.querySelector("i").classList.remove("hidden");
     581    event.target.disabled = true;
     582
     583    let gifthuntAction = "delete";
     584    const data = {
     585        nonce: gifthuntFreeNonce,
     586        action: "gifthuntfree_action",
     587        gifthuntAction,
     588        id: giftSessionId,
     589    };
     590
     591    jQuery.post(ajaxurl, data, (response) => {
     592        event.target.querySelector("i").classList.add("hidden");
     593        event.target.disabled = false;
     594        document.querySelector(".gifthunt-form__delete-confirm-modal").classList.add("hidden");
     595
     596        if (response.status != "success") {
     597            document.querySelectorAll(".gifthunt-form-result--error").forEach((errorSection) => {
     598                errorSection.querySelector(".gifthunt-form-result__content").innerHTML = response.data;
     599                errorSection.classList.remove("hidden");
     600            });
     601            document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
     602        } else {
     603            // redirect to session list
     604            window.location.href = `admin.php?page=gifthuntfree-sessions&msg=deleted`;
     605            return;
     606        }
    591607    });
    592608});
     
    596612 */
    597613document.querySelector("#gifthunt-send-test-success-email").addEventListener("click", () => {
    598   document.querySelector(".gifthunt-form__test-mail-modal").classList.remove("hidden");
    599 });
    600 
    601 document.querySelector("#button--cancel-send-testmail").addEventListener("click", () => {
    602   document.querySelector(".gifthunt-form__test-mail-modal").classList.add("hidden");
    603 });
    604 
    605 document.querySelector(".gifthunt-form__test-mail-modal__close-button").addEventListener("click", () => {
    606   document.querySelector(".gifthunt-form__test-mail-modal").classList.add("hidden");
     614    document.querySelector(".gifthunt-form__test-mail-modal").classList.remove("hidden");
     615});
     616
     617document.querySelector("#button--cancel-send-testmail").addEventListener("click", () => {
     618    document.querySelector(".gifthunt-form__test-mail-modal").classList.add("hidden");
     619});
     620
     621document.querySelector(".gifthunt-form__test-mail-modal__close-button").addEventListener("click", () => {
     622    document.querySelector(".gifthunt-form__test-mail-modal").classList.add("hidden");
    607623});
    608624
    609625document.querySelector("#button--confirm-send-testmail").addEventListener("click", (event) => {
    610   /**
    611    * Check email format
    612    */
    613   const toMail = document.querySelector("#to").value;
    614   if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(toMail)) {
    615     document.querySelector("#to").focus();
    616     alert("Please, use a valid email address");
    617     return;
    618   }
    619 
    620   event.target.disabled = true;
    621   event.target.querySelector("i").classList.remove("hidden");
    622 
    623   let gifthuntAction = "send_test_mail";
    624   const data = {
    625     'nonce': gifthuntFreeNonce,
    626     'action': 'gifthuntfree_action',
    627     gifthuntAction,
    628     "to": toMail,
    629     "success_email_sender_name": document.querySelector("#success_email_sender_name").value,
    630     "success_email_sender_email": document.querySelector("#success_email_sender_email").value,
    631     "success_email_subject": document.querySelector("#success_email_subject").value,
    632     "success_email_body": tinyMCE.editors["success_email_body"].getContent()
    633   };
    634 
    635   jQuery.post(ajaxurl, data, (response) => {
    636     event.target.querySelector("i").classList.add("hidden");
    637     event.target.disabled = false;
    638     document.querySelector(".gifthunt-form__test-mail-modal").classList.add("hidden");
    639 
    640         if(response.status != "success"){
    641       document.querySelectorAll(".gifthunt-form-result--error").forEach(errorSection => {
    642         errorSection.querySelector(".gifthunt-form-result__content").innerHTML = response.data;
    643         errorSection.classList.remove("hidden");
    644       });
    645       document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
    646     } else {
    647       document.querySelectorAll(".gifthunt-form-result--success").forEach(successSection => {
    648         successSection.querySelector(".gifthunt-form-result__content").innerHTML = response.data;
    649         successSection.classList.remove("hidden");
    650       });
    651       document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
    652     }
    653     });
    654 
    655 
     626    /**
     627     * Check email format
     628     */
     629    const toMail = document.querySelector("#to").value;
     630    if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(toMail)) {
     631        document.querySelector("#to").focus();
     632        alert("Please, use a valid email address");
     633        return;
     634    }
     635
     636    event.target.disabled = true;
     637    event.target.querySelector("i").classList.remove("hidden");
     638
     639    let gifthuntAction = "send_test_mail";
     640    const data = {
     641        nonce: gifthuntFreeNonce,
     642        action: "gifthuntfree_action",
     643        gifthuntAction,
     644        to: toMail,
     645        success_email_sender_name: document.querySelector("#success_email_sender_name").value,
     646        success_email_sender_email: document.querySelector("#success_email_sender_email").value,
     647        success_email_subject: document.querySelector("#success_email_subject").value,
     648        success_email_body: tinyMCE.editors["success_email_body"].getContent(),
     649    };
     650
     651    jQuery.post(ajaxurl, data, (response) => {
     652        event.target.querySelector("i").classList.add("hidden");
     653        event.target.disabled = false;
     654        document.querySelector(".gifthunt-form__test-mail-modal").classList.add("hidden");
     655
     656        if (response.status != "success") {
     657            document.querySelectorAll(".gifthunt-form-result--error").forEach((errorSection) => {
     658                errorSection.querySelector(".gifthunt-form-result__content").innerHTML = response.data;
     659                errorSection.classList.remove("hidden");
     660            });
     661            document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
     662        } else {
     663            document.querySelectorAll(".gifthunt-form-result--success").forEach((successSection) => {
     664                successSection.querySelector(".gifthunt-form-result__content").innerHTML = response.data;
     665                successSection.classList.remove("hidden");
     666            });
     667            document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
     668        }
     669    });
    656670});
    657671
     
    660674 */
    661675const accordionTitle = document.querySelectorAll(".gifthunt-accordion__title");
    662 if(accordionTitle.length){
    663   accordionTitle.forEach(title => {
    664     title.addEventListener("click", () => toggleAccordion(title));
    665   });
    666 }
    667 
    668 function toggleAccordion(title){
    669   const accordionSection = title.parentNode;
    670   const accordion = accordionSection.parentNode;
    671  
    672   if(accordionSection.classList.contains("gifthunt-accordion__section--active")){
    673     // this is the active section, don't do anything
    674     return;
    675   }
    676 
    677   const activeAccordionSection = accordion.querySelector(".gifthunt-accordion__section--active");
    678   if(activeAccordionSection){
    679     activeAccordionSection.classList.remove("gifthunt-accordion__section--active");
    680   }
    681 
    682   accordionSection.classList.add("gifthunt-accordion__section--active");
    683 
    684   return;
     676if (accordionTitle.length) {
     677    accordionTitle.forEach((title) => {
     678        title.addEventListener("click", () => toggleAccordion(title));
     679    });
     680}
     681
     682function toggleAccordion(title) {
     683    const accordionSection = title.parentNode;
     684    const accordion = accordionSection.parentNode;
     685
     686    if (accordionSection.classList.contains("gifthunt-accordion__section--active")) {
     687        // this is the active section, don't do anything
     688        return;
     689    }
     690
     691    const activeAccordionSection = accordion.querySelector(".gifthunt-accordion__section--active");
     692    if (activeAccordionSection) {
     693        activeAccordionSection.classList.remove("gifthunt-accordion__section--active");
     694    }
     695
     696    accordionSection.classList.add("gifthunt-accordion__section--active");
     697
     698    return;
    685699}
    686700
    687701const gifthuntCustomIconUploadButton = document.querySelector("#gifthunt__icon-upload-button");
    688 if(gifthuntCustomIconUploadButton){
    689   let gifthuntCustomIconUploader;
    690 
    691   gifthuntCustomIconUploadButton.addEventListener("click", (e) => {
    692     e.preventDefault();
    693 
    694     gifthuntCustomIconUploader ? gifthuntCustomIconUploader.open() : (
    695       (gifthuntCustomIconUploader = wp.media.frames.gifthuntCustomIconUploader = wp.media({
    696         title: 'Select custom icon',
    697         button: {
    698           text: 'Use this custom icon'
    699         },
    700         multiple: !1
    701       })).on('select', function () {
    702         attachment = gifthuntCustomIconUploader.state().get("selection").first().toJSON();
    703         document.querySelector("#custom_icon").value = attachment.url;
    704         document.querySelector("#gifthunt__icon-upload-preview img").src = attachment.url;
    705         document.querySelector("#gifthunt__icon-upload-preview label").style.display = "block";
    706         document.querySelector("#gifthunt__icon-upload-preview input[type='radio']").checked = true;
    707       }), gifthuntCustomIconUploader.open());
    708   });
     702if (gifthuntCustomIconUploadButton) {
     703    let gifthuntCustomIconUploader;
     704
     705    gifthuntCustomIconUploadButton.addEventListener("click", (e) => {
     706        e.preventDefault();
     707
     708        gifthuntCustomIconUploader
     709            ? gifthuntCustomIconUploader.open()
     710            : ((gifthuntCustomIconUploader = wp.media.frames.gifthuntCustomIconUploader = wp.media({
     711                    title: "Select custom icon",
     712                    button: {
     713                        text: "Use this custom icon",
     714                    },
     715                    multiple: !1,
     716              })).on("select", function () {
     717                    attachment = gifthuntCustomIconUploader.state().get("selection").first().toJSON();
     718                    document.querySelector("#custom_icon").value = attachment.url;
     719                    document.querySelector("#gifthunt__icon-upload-preview img").src = attachment.url;
     720                    document.querySelector("#gifthunt__icon-upload-preview label").style.display = "block";
     721                    document.querySelector("#gifthunt__icon-upload-preview input[type='radio']").checked = true;
     722              }),
     723              gifthuntCustomIconUploader.open());
     724    });
    709725}
    710726
    711727// remove success parameter from URL (to avoid display the success message after refresh)
    712728let currentLocation = window.top.location.href;
    713 if(currentLocation.includes("msg=created")){
    714   window.history.pushState("gifthuntcreated", "", currentLocation.replace("msg=created", ""));
     729if (currentLocation.includes("msg=created")) {
     730    window.history.pushState("gifthuntcreated", "", currentLocation.replace("msg=created", ""));
    715731}
    716732
    717733// icon animation preview
    718734const iconAnimationPreviewItems = document.querySelectorAll("#gifthunt__icon-animation-list label");
    719 if(iconAnimationPreviewItems){
    720   iconAnimationPreviewItems.forEach(iconAnimationPreview => {
    721     iconAnimationPreview.addEventListener("mouseover", () => {
    722       toggleAnimationPreview("mouseover", iconAnimationPreview);
    723     });
    724 
    725     iconAnimationPreview.addEventListener("mouseleave", () => {
    726       toggleAnimationPreview("mouseleave", iconAnimationPreview);
    727     });
    728   });
    729 }
    730 
    731 function toggleAnimationPreview(event, iconAnimationItem){
    732   const animationPreviewSpan = iconAnimationItem.querySelector(".gifthunt-icon-animation-preview");
    733   const animationClass = animationPreviewSpan.dataset.animation;
    734   if(event == "mouseover"){
    735     animationPreviewSpan.querySelector("span").classList.add(animationClass);
    736   } else {
    737     animationPreviewSpan.querySelector("span").classList.remove(animationClass);
    738   }
     735if (iconAnimationPreviewItems) {
     736    iconAnimationPreviewItems.forEach((iconAnimationPreview) => {
     737        iconAnimationPreview.addEventListener("mouseover", () => {
     738            toggleAnimationPreview("mouseover", iconAnimationPreview);
     739        });
     740
     741        iconAnimationPreview.addEventListener("mouseleave", () => {
     742            toggleAnimationPreview("mouseleave", iconAnimationPreview);
     743        });
     744    });
     745}
     746
     747function toggleAnimationPreview(event, iconAnimationItem) {
     748    const animationPreviewSpan = iconAnimationItem.querySelector(".gifthunt-icon-animation-preview");
     749    const animationClass = animationPreviewSpan.dataset.animation;
     750    if (event == "mouseover") {
     751        animationPreviewSpan.querySelector("span").classList.add(animationClass);
     752    } else {
     753        animationPreviewSpan.querySelector("span").classList.remove(animationClass);
     754    }
    739755}
    740756
    741757// gifthunt session from accordion
    742758const gifthuntFormAccordionLabels = document.querySelectorAll(".gifthunt-form-group__label--accordion");
    743 if(gifthuntFormAccordionLabels){
    744   gifthuntFormAccordionLabels.forEach(gifthuntFormAccordionLabel => {
    745     gifthuntFormAccordionLabel.addEventListener("click", toggleFormSectionBody);
    746   })
    747 }
    748 
    749 function toggleFormSectionBody(){
    750   const section = this.closest(".gifthunt-card__section");
    751   if(section.classList.contains("gifthunt-card__section--closed")){
    752     section.classList.remove("gifthunt-card__section--closed");
    753     section.classList.add("gifthunt-card__section--opened");
    754   } else {
    755     section.classList.remove("gifthunt-card__section--opened");
    756     section.classList.add("gifthunt-card__section--closed");
    757   }
    758 }
     759if (gifthuntFormAccordionLabels) {
     760    gifthuntFormAccordionLabels.forEach((gifthuntFormAccordionLabel) => {
     761        gifthuntFormAccordionLabel.addEventListener("click", toggleFormSectionBody);
     762    });
     763}
     764
     765function toggleFormSectionBody() {
     766    const section = this.closest(".gifthunt-card__section");
     767    if (section.classList.contains("gifthunt-card__section--closed")) {
     768        section.classList.remove("gifthunt-card__section--closed");
     769        section.classList.add("gifthunt-card__section--opened");
     770    } else {
     771        section.classList.remove("gifthunt-card__section--opened");
     772        section.classList.add("gifthunt-card__section--closed");
     773    }
     774}
  • gift-hunt/tags/1.0.1/classes/class-gifthuntfree.php

    r2330816 r2409806  
    4343  public $form_label_legal = "I have read and agree to the Privacy Policy and Terms of Service";
    4444  public $form_legal_url;
     45  public $success_email_send = 1;
    4546  public $success_email_sender_name;
    4647  public $success_email_sender_email;
     
    122123      form_label_legal varchar(250) NOT NULL ,
    123124      form_legal_url varchar(250) NOT NULL ,
     125      success_email_send boolean NOT NULL DEFAULT 1 ,
    124126      success_email_sender_name varchar(100) NOT NULL ,
    125127      success_email_sender_email varchar(100) NOT NULL ,
     
    354356      "form_label_legal"                    => sanitize_text_field( $_POST["gifthuntSessionData"]["form_label_legal"] ),
    355357      "form_legal_url"                      => esc_url( $_POST["gifthuntSessionData"]["form_legal_url"] ),
     358      "success_email_send"                  => intval( $_POST["gifthuntSessionData"]["success_email_send"] ),
    356359      "success_email_sender_name"           => sanitize_text_field( $_POST["gifthuntSessionData"]["success_email_sender_name"] ),
    357360      "success_email_sender_email"          => sanitize_email( $_POST["gifthuntSessionData"]["success_email_sender_email"] ),
     
    936939    }
    937940
    938     // send mail to hunter
    939     $to = sanitize_email( $_POST["email"] );
    940     $from_name = stripslashes_deep( $gifthunt_data->success_email_sender_name );
    941     $from_email = stripslashes_deep( $gifthunt_data->success_email_sender_email );
    942 
    943     // replace placeholders with collected information
    944     $subject = str_replace(
    945                 array( "%firstname%", "%lastname%", "%email%", "%gift%" ) ,
    946                 array( sanitize_text_field( $_POST["firstName"] ), sanitize_text_field( $_POST["lastName"] ), sanitize_email( $_POST["email"] ), stripslashes_deep( $collected_gift["gift"] ) ),
    947                 stripslashes_deep( $gifthunt_data->success_email_subject )
    948               );
    949 
    950     $message = str_replace(
    951                 array( "%firstname%", "%lastname%", "%email%", "%gift%" ) ,
    952                 array( $hunter_data["firstName"], $hunter_data["lastName"], $hunter_data["email"], stripslashes_deep( $collected_gift["gift"] ) ),
    953                 stripslashes_deep( $gifthunt_data->success_email_body )
    954               );
    955 
    956     // send the final mail to hunter
    957     $mail_result = wp_mail( $to, $subject, $message, "From: " . $from_name . " <" . $from_email . ">\r\nContent-Type: text/html; charset=UTF-8" );
     941    if( $gifthunt_data->success_email_send == 1 ){
     942      // send mail to hunter
     943      $to = sanitize_email( $_POST["email"] );
     944      $from_name = stripslashes_deep( $gifthunt_data->success_email_sender_name );
     945      $from_email = stripslashes_deep( $gifthunt_data->success_email_sender_email );
     946
     947      // replace placeholders with collected information
     948      $subject = str_replace(
     949                  array( "%firstname%", "%lastname%", "%email%", "%gift%" ) ,
     950                  array( sanitize_text_field( $_POST["firstName"] ), sanitize_text_field( $_POST["lastName"] ), sanitize_email( $_POST["email"] ), stripslashes_deep( $collected_gift["gift"] ) ),
     951                  stripslashes_deep( $gifthunt_data->success_email_subject )
     952                );
     953
     954      $message = str_replace(
     955                  array( "%firstname%", "%lastname%", "%email%", "%gift%" ) ,
     956                  array( $hunter_data["firstName"], $hunter_data["lastName"], $hunter_data["email"], stripslashes_deep( $collected_gift["gift"] ) ),
     957                  stripslashes_deep( $gifthunt_data->success_email_body )
     958                );
     959
     960      // send the final mail to hunter
     961      $mail_result = wp_mail( $to, $subject, $message, "From: " . $from_name . " <" . $from_email . ">\r\nContent-Type: text/html; charset=UTF-8" );
     962    }
    958963
    959964    // send back gift to frontend
  • gift-hunt/tags/1.0.1/gifthuntfree.php

    r2330816 r2409806  
    44 * Plugin URI:        https://gifthuntplugin.com
    55 * Description:       Online treasure hunt on your WordPress site
    6  * Version:           1.0.2
     6 * Version:           1.0.3
    77 * Author:            Ferenc Forgacs - @feriforgacs
    88 * Author URI:        https://feriforgacs.me
     
    2020define( "GIFTHUNTFREE_FRONTEND_ENDPOINT", admin_url( "admin-ajax.php" ) );
    2121define( "GIFTHUNTFREE_FRONTEND_ASSETS_FOLDER", plugins_url( "assets/", __FILE__ ) );
    22 define( "GIFTHUNTFREE_VERSION", "1.0.2" );
     22define( "GIFTHUNTFREE_VERSION", "1.0.3" );
    2323
    2424include "classes/class-gifthuntfree.php";
  • gift-hunt/tags/1.0.1/readme.txt

    r2331077 r2409806  
    99Donate link: https://www.paypal.me/feriforgacs/5usd
    1010Requires at least: 4.1
    11 Tested up to: 5.4.2
    12 Stable tag: 1.0.2
    13 Version: 1.0.2
     11Tested up to: 5.5.2
     12Stable tag: 1.0.3
     13Version: 1.0.3
    1414Requires PHP: 5.6.20
    1515Text Domain: gifthuntfree
     
    207207== Changelog ==
    208208
     209= 1.0.3 =
     210* Ability to disable sending a success email
     211
    209212= 1.0.2 =
    210213* Bug fix: Can't save session when there are no changes
  • gift-hunt/tags/1.0.1/views/gifthunt-session-form.view.php

    r2330816 r2409806  
    481481        <div class="gifthunt-card">
    482482            <div class="gifthunt-card__section">
     483                <div class="gifthunt-card__title">
     484                    <div class="gifthunt-card__title">
     485                        <h3>Success Email</h3>
     486                        <div class="gifthunt-form-group">
     487                            <label>
     488                                <input type="checkbox" name="success_email_send" id="success_email_send" value="1" <?php
     489                                if ( $gifthuntfree->success_email_send ) {
     490                                    echo "checked";
     491                                }
     492                                ?> /> Send an email to users after they filled the data collection form.
     493                            </label>
     494                            <p class="gifthunt-form-group__help-text">Choose this option, if you'd like to send an email to the visitors who found the gift and filled the data collection form. You can use this email to send additional information to the users.</p>
     495                        </div>
     496                    </div>
     497                </div>
     498            </div>
     499
     500            <div class="gifthunt-card__section success-email-section <?php
     501            if( ! $gifthuntfree->success_email_send ){
     502                echo "hidden";
     503            }
     504            ?>">
    483505                <div class="gifthunt-card__title">
    484506                    <h3>Success email options</h3>
     
    512534            </div>
    513535
    514             <div class="gifthunt-card__section">
     536            <div class="gifthunt-card__section success-email-section <?php
     537            if( ! $gifthuntfree->success_email_send ){
     538                echo "hidden";
     539            }
     540            ?>">
    515541                <div class="gifthunt-card__columns">
    516542                    <div class="gifthunt-card__column">
     
    532558            </div>
    533559
    534             <div class="gifthunt-card__section">
     560            <div class="gifthunt-card__section success-email-section <?php
     561            if( ! $gifthuntfree->success_email_send ){
     562                echo "hidden";
     563            }
     564            ?>">
    535565                <div class="gifthunt-form-group">
    536566                    <label for="success_email_subject" class="gifthunt-form-group__label">Success email subject</label>
     
    540570            </div>
    541571
    542             <div class="gifthunt-card__section">
     572            <div class="gifthunt-card__section success-email-section <?php
     573            if( ! $gifthuntfree->success_email_send ){
     574                echo "hidden";
     575            }
     576            ?>">
    543577                <div class="gifthunt-form-group">
    544578                    <label for="success_email_body" class="gifthunt-form-group__label">Success email body</label>
     
    553587            </div>
    554588
    555             <div class="gifthunt-card__section">
     589            <div class="gifthunt-card__section success-email-section <?php
     590            if( ! $gifthuntfree->success_email_send ){
     591                echo "hidden";
     592            }
     593            ?>">
    556594                <div class="gifthunt-form-group">
    557595                    <button type="button" class="button" id="gifthunt-send-test-success-email">Send a test email</button>
  • gift-hunt/tags/1.0.2/assets/css/gifthunt.css

    r2330816 r2409806  
    1 .gifthunt-badge {
    2   display: inline-block;
    3   padding: .25em .4em;
    4   font-size: 75%;
    5   font-weight: 700;
    6   line-height: 1.5;
    7   text-align: center;
    8   white-space: nowrap;
    9   vertical-align: baseline;
    10   border-radius: .25rem;
    11   -webkit-transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;
    12   transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;
    13   transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    14   transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;
    15 }
    16 
    17 .gifthunt-badge--active {
    18   color: #fff;
    19   background-color: #28a745;
    20 }
    21 
    22 .gifthunt-badge--inactive {
    23   color: #212529;
    24   background-color: #f8f9fa;
    25 }
    26 
    27 .gifthunt-helptext {
    28   color: #888;
    29   margin: 2rem auto;
    30   text-align: center;
    31 }
    32 
    33 .gifthunt-helptext p {
    34   border: 1px solid #ddd;
    35   border-radius: 2rem;
    36   display: inline-block;
    37   padding: 1rem 2rem;
    38 }
    39 
    40 .gifthunt-helptext__icon {
    41   display: inline-block;
    42   height: 1rem;
    43   margin: 0 1rem 0 0;
    44   width: 1rem;
    45 }
    46 
    47 .gifthunt-helptext__icon svg {
    48   display: block;
    49   fill: #0073aa;
    50   margin-top: 2px;
    51 }
    52 
    53 .gifthunt-external-link-icon {
    54   display: inline-block;
    55   height: 1rem;
    56   width: 1rem;
    57   max-height: 100%;
    58   max-width: 100%;
    59   margin: auto;
    60 }
    61 
    62 .gifthunt-external-link-icon svg {
    63   display: block;
    64   fill: #0073aa;
    65   margin-top: 4px;
    66 }
    67 
    68 .gifthunt-form {
    69   display: -webkit-box;
    70   display: -ms-flexbox;
    71   display: flex;
    72   margin-top: 60px;
    73   max-width: 900px;
    74 }
    75 
    76 .gifthunt-form__form {
    77   -webkit-box-flex: 2;
    78       -ms-flex: 2;
    79           flex: 2;
    80 }
    81 
    82 .gifthunt-form__sidebar {
    83   -webkit-box-flex: 1;
    84       -ms-flex: 1;
    85           flex: 1;
    86   padding-left: 20px;
    87 }
    88 
    89 .gifthunt-form-result {
    90   margin: 10px 0;
    91   position: relative;
    92 }
    93 
    94 .gifthunt-form-result--error {
    95   background-color: #f9e2e2;
    96   border-left: 3px solid #d94f4f;
    97 }
    98 
    99 .gifthunt-form-result--success {
    100   background-color: #eff9f1;
    101   border-left: 3px solid #4ab866;
    102 }
    103 
    104 .gifthunt-form-result__content {
    105   margin: 1em 25px 1em 0;
    106   padding: 20px 12px;
    107 }
    108 
    109 .gifthunt-form-result__content ul {
    110   list-style: disc;
    111   margin: 20px 0 20px 20px;
    112 }
    113 
    114 .gifthunt-form-result__content ul li {
    115   margin: 0 0 15px 10px;
    116   padding: 0 0 0 5px;
    117 }
    118 
    119 .gifthunt-form-result__modal {
    120   -webkit-box-align: center;
    121       -ms-flex-align: center;
    122           align-items: center;
    123   background: rgba(0, 0, 0, 0.5);
    124   display: -webkit-box;
    125   display: -ms-flexbox;
    126   display: flex;
    127   height: 100%;
    128   -webkit-box-pack: center;
    129       -ms-flex-pack: center;
    130           justify-content: center;
    131   left: 0;
    132   overflow-y: auto;
    133   position: fixed;
    134   top: 0;
    135   width: 100%;
    136   z-index: 10000;
    137 }
    138 
    139 .gifthunt-form-result__modal-content {
    140   margin: 0 auto;
    141   max-width: 500px;
    142   width: 100%;
    143 }
    144 
    145 .gifthunt-form-result__modal.hidden {
    146   display: none;
    147 }
    148 
    149 .gifthunt-form-result__close-button {
    150   background: none;
    151   border: none;
    152   cursor: pointer;
    153   font-size: 18px;
    154   height: 30px;
    155   position: absolute;
    156   right: 0;
    157   top: 0;
    158   width: 30px;
    159 }
    160 
    161 .gifthunt-form__delete-confirm-modal, .gifthunt-form__test-mail-modal, .gifthunt-form__delete-hunter-confirm-modal, .gifthunt-form__success-email-template-preview-modal {
    162   -webkit-box-align: center;
    163       -ms-flex-align: center;
    164           align-items: center;
    165   background: rgba(0, 0, 0, 0.5);
    166   display: -webkit-box;
    167   display: -ms-flexbox;
    168   display: flex;
    169   height: 100%;
    170   -webkit-box-pack: center;
    171       -ms-flex-pack: center;
    172           justify-content: center;
    173   left: 0;
    174   overflow-y: auto;
    175   position: fixed;
    176   top: 0;
    177   width: 100%;
    178   z-index: 10000;
    179 }
    180 
    181 .gifthunt-form__delete-confirm-modal-content, .gifthunt-form__test-mail-modal-content, .gifthunt-form__delete-hunter-confirm-modal-content, .gifthunt-form__success-email-template-preview-modal-content {
    182   background: #fff;
    183   border-radius: 3px;
    184   -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    185           box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    186   margin: 0 auto;
    187   max-width: 500px;
    188   position: relative;
    189   width: 100%;
    190 }
    191 
    192 .gifthunt-form__delete-confirm-modal-content h3, .gifthunt-form__test-mail-modal-content h3, .gifthunt-form__delete-hunter-confirm-modal-content h3, .gifthunt-form__success-email-template-preview-modal-content h3 {
    193   border-bottom: 1px solid #eee;
    194   margin: 0 0 20px 0;
    195   padding: 20px;
    196 }
    197 
    198 .gifthunt-form__delete-confirm-modal-content p, .gifthunt-form__test-mail-modal-content p, .gifthunt-form__delete-hunter-confirm-modal-content p, .gifthunt-form__success-email-template-preview-modal-content p {
    199   border-bottom: 1px solid #eee;
    200   margin: 0 0 20px 0;
    201   padding: 0 20px 20px;
    202 }
    203 
    204 .gifthunt-form__delete-confirm-modal-content label, .gifthunt-form__delete-confirm-modal-content input, .gifthunt-form__test-mail-modal-content label, .gifthunt-form__test-mail-modal-content input, .gifthunt-form__delete-hunter-confirm-modal-content label, .gifthunt-form__delete-hunter-confirm-modal-content input, .gifthunt-form__success-email-template-preview-modal-content label, .gifthunt-form__success-email-template-preview-modal-content input {
    205   margin: 0 20px;
    206 }
    207 
    208 .gifthunt-form__delete-confirm-modal-content input, .gifthunt-form__test-mail-modal-content input, .gifthunt-form__delete-hunter-confirm-modal-content input, .gifthunt-form__success-email-template-preview-modal-content input {
    209   margin-bottom: 10px;
    210 }
    211 
    212 .gifthunt-form__delete-confirm-modal__close-button, .gifthunt-form__test-mail-modal__close-button, .gifthunt-form__delete-hunter-confirm-modal__close-button, .gifthunt-form__success-email-template-preview-modal__close-button {
    213   background: none;
    214   border: none;
    215   cursor: pointer;
    216   font-size: 18px;
    217   height: 30px;
    218   position: absolute;
    219   right: 0;
    220   top: 0;
    221   width: 30px;
    222 }
    223 
    224 .gifthunt-form__delete-confirm-actions, .gifthunt-form__test-mail-actions {
    225   display: -webkit-box;
    226   display: -ms-flexbox;
    227   display: flex;
    228   -webkit-box-pack: justify;
    229       -ms-flex-pack: justify;
    230           justify-content: space-between;
    231   padding: 0 20px 20px;
    232 }
    233 
    234 .gifthunt-form__delete-confirm-modal.hidden, .gifthunt-form__test-mail-modal.hidden, .gifthunt-form__delete-hunter-confirm-modal.hidden, .gifthunt-form__success-email-template-preview-modal.hidden {
    235   display: none;
    236 }
    237 
    238 .gifthunt-form__popup-design-preview-modal {
    239   -webkit-box-align: center;
    240       -ms-flex-align: center;
    241           align-items: center;
    242   background: rgba(0, 0, 0, 0.8);
    243   display: -webkit-box;
    244   display: -ms-flexbox;
    245   display: flex;
    246   height: 100%;
    247   -webkit-box-pack: center;
    248       -ms-flex-pack: center;
    249           justify-content: center;
    250   left: 0;
    251   overflow-y: scroll;
    252   position: fixed;
    253   top: 0;
    254   width: 100%;
    255   z-index: 99999;
    256 }
    257 
    258 .gifthunt-form__popup-design-preview-modal img {
    259   border-radius: 3px;
    260   -webkit-box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.8);
    261           box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.8);
    262   cursor: pointer;
    263 }
    264 
    265 .gifthunt-form__popup-design-preview-modal.hidden {
    266   display: none;
    267 }
    268 
    269 .gifthunt-form__success-email-template-preview-modal-body {
    270   border-bottom: 1px solid #eee;
    271   margin-bottom: 15px;
    272   padding: 0 15px 15px;
    273 }
    274 
    275 .gifthunt-form__success-email-template-preview-modal-body img {
    276   width: 100%;
    277 }
    278 
    279 .gifthunt-card {
    280   background: #fff;
    281   border: 1px solid #e5e5e5;
    282   -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    283           box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    284   margin: 10px 0;
    285   padding: 0;
    286 }
    287 
    288 .gifthunt-card__columns {
    289   display: -webkit-box;
    290   display: -ms-flexbox;
    291   display: flex;
    292 }
    293 
    294 .gifthunt-card__column {
    295   -webkit-box-flex: 1;
    296       -ms-flex: 1;
    297           flex: 1;
    298   padding: 0 20px 0 0;
    299 }
    300 
    301 .gifthunt-card__column:last-child {
    302   padding-right: 0;
    303 }
    304 
    305 .gifthunt-card__title {
    306   margin: 0;
    307   padding: 0;
    308 }
    309 
    310 .gifthunt-card__section {
    311   border-bottom: 1px solid #eee;
    312   padding: 20px;
    313 }
    314 
    315 .gifthunt-card__section--secondary {
    316   background: #f5f5f5;
    317   border-bottom: 1px solid #e3e3e3;
    318 }
    319 
    320 .gifthunt-card__section--closed, .gifthunt-card__section--opened {
    321   padding: 0;
    322 }
    323 
    324 .gifthunt-card__section--closed .gifthunt-form-group__label, .gifthunt-card__section--opened .gifthunt-form-group__label {
    325   padding: 10px 0 10px 10px;
    326 }
    327 
    328 .gifthunt-card__section--closed .gifthunt-form-group__label span, .gifthunt-card__section--opened .gifthunt-form-group__label span {
    329   display: inline-block;
    330   margin-right: 10px;
    331 }
    332 
    333 .gifthunt-card__section--closed .gifthunt-form-group__body, .gifthunt-card__section--opened .gifthunt-form-group__body {
    334   padding: 20px;
    335 }
    336 
    337 .gifthunt-card__section--closed .gifthunt-form-group__label {
    338   background: #ebebeb;
    339   border-bottom: 1px solid #eee;
    340 }
    341 
    342 .gifthunt-card__section--closed .gifthunt-form-group__body {
    343   display: none;
    344 }
    345 
    346 .gifthunt-card__section--opened .gifthunt-form-group__label {
    347   background: #f5f5f5;
    348   border-bottom: 1px solid #eee;
    349 }
    350 
    351 .gifthunt-card__section--opened .gifthunt-form-group__label span {
    352   -webkit-transform: rotate(90deg);
    353           transform: rotate(90deg);
    354 }
    355 
    356 .gifthunt-card__section--opened .gifthunt-form-group__body {
    357   display: block;
    358 }
    359 
    360 .gifthunt-card__section:last-child {
    361   border-bottom: none;
    362 }
    363 
    364 .gifthunt-form-group {
    365   display: -webkit-box;
    366   display: -ms-flexbox;
    367   display: flex;
    368   -webkit-box-orient: vertical;
    369   -webkit-box-direction: normal;
    370       -ms-flex-direction: column;
    371           flex-direction: column;
    372   margin: 0 auto 1.5rem;
    373 }
    374 
    375 .gifthunt-form-group__label {
    376   cursor: pointer;
    377   font-size: .9rem;
    378   font-weight: bold;
    379   line-height: 2rem;
    380 }
    381 
    382 .gifthunt-form-group label {
    383   cursor: pointer;
    384   line-height: 2rem;
    385 }
    386 
    387 .gifthunt-form-group input[type="text"], .gifthunt-form-group input[type="email"], .gifthunt-form-group input[type="number"], .gifthunt-form-group input[type="url"] {
    388   height: 2.5rem;
    389   line-height: 2.5rem;
    390 }
    391 
    392 .gifthunt-form-group input::-webkit-input-placeholder {
    393   color: #c2c2c2;
    394   font-style: italic;
    395 }
    396 
    397 .gifthunt-form-group input:-ms-input-placeholder {
    398   color: #c2c2c2;
    399   font-style: italic;
    400 }
    401 
    402 .gifthunt-form-group input::-ms-input-placeholder {
    403   color: #c2c2c2;
    404   font-style: italic;
    405 }
    406 
    407 .gifthunt-form-group input::placeholder {
    408   color: #c2c2c2;
    409   font-style: italic;
    410 }
    411 
    412 .gifthunt-form-group input.gifthunt-field-error {
    413   background-color: #fbeae5;
    414   border-color: #bf0711;
    415 }
    416 
    417 .gifthunt-form-group textarea.gifthunt-field-error {
    418   background-color: #fbeae5;
    419   border-color: #bf0711;
    420 }
    421 
    422 .gifthunt-form-group__help-text {
    423   color: #888;
    424   margin: .5rem 0;
    425   padding: 0;
    426 }
    427 
    428 .gifthunt-form-group__body label {
    429   display: block;
    430 }
    431 
    432 .gifthunt-form-group:last-child {
    433   margin-bottom: 0;
    434 }
    435 
    436 .gifthunt-input-group {
    437   display: -webkit-box;
    438   display: -ms-flexbox;
    439   display: flex;
    440 }
    441 
    442 .gifthunt-input-group input {
    443   -webkit-box-flex: 1;
    444       -ms-flex: 1;
    445           flex: 1;
    446 }
    447 
    448 .gifthunt-input-group button {
    449   height: 2.5rem !important;
    450   line-height: 2.5rem !important;
    451   margin-left: 20px !important;
    452   color: #bf0711 !important;
    453 }
    454 
    455 .gifthunt--hidden {
    456   display: none;
    457 }
    458 
    459 .gifthunt-page-actions {
    460   -webkit-box-align: center;
    461       -ms-flex-align: center;
    462           align-items: center;
    463   border-top: 1px solid #ccc;
    464   display: -webkit-box;
    465   display: -ms-flexbox;
    466   display: flex;
    467   -webkit-box-pack: justify;
    468       -ms-flex-pack: justify;
    469           justify-content: space-between;
    470   margin: 20px 0;
    471   max-width: 900px;
    472   padding: 20px 0;
    473 }
    474 
    475 .gifthunt-page-actions--header {
    476   border-top: none;
    477   -webkit-box-pack: end;
    478       -ms-flex-pack: end;
    479           justify-content: flex-end;
    480   margin: 0;
    481   padding: 10px 0;
    482 }
    483 
    484 .gifthunt-page-actions--header .button {
    485   margin-left: 20px;
    486 }
    487 
    488 .gifthunt-page-actions--header h1 {
    489   width: 100%;
    490 }
    491 
    492 .gifthunt-page-actions--header h1 small {
    493   font-size: 13px;
    494 }
    495 
    496 .gifthunt-button i {
    497   display: -webkit-inline-box;
    498   display: -ms-inline-flexbox;
    499   display: inline-flex;
    500   height: 100%;
    501 }
    502 
    503 .gifthunt-button i svg {
    504   -ms-flex-item-align: center;
    505       -ms-grid-row-align: center;
    506       align-self: center;
    507 }
    508 
    509 .gifthunt-button i.hidden {
    510   display: none;
    511 }
    512 
    513 .gifthunt-button--link {
    514   color: #888;
    515   line-height: 3rem;
    516   text-decoration: none;
    517 }
    518 
    519 .gifthunt-button--danger {
    520   background: #bf0711 !important;
    521   border-color: #bf0711 !important;
    522   color: #fff !important;
    523 }
    524 
    525 .gifthunt-button--danger:hover {
    526   background: #a1030b !important;
    527   border-color: #6d0308 !important;
    528 }
    529 
    530 .gifthunt-button--danger:disabled.button, .gifthunt-button--danger[disabled].button {
    531   background: #a1030b !important;
    532   border-color: #6d0308 !important;
    533   color: #fff !important;
    534   text-shadow: none !important;
    535   opacity: .8;
    536 }
    537 
    538 .gifthunt-error-message {
    539   color: #bf0711;
    540   line-height: 1.5rem;
    541 }
    542 
    543 .gifthunt-accordion {
    544   border: 1px solid #eee;
    545 }
    546 
    547 .gifthunt-accordion__title {
    548   background: #ebebeb;
    549   border-bottom: 1px solid #eee;
    550   color: #555;
    551   cursor: pointer;
    552   font-size: 14px;
    553   font-weight: 700;
    554   line-height: 40px;
    555   margin: 0;
    556   padding: 0 0 0 10px;
    557 }
    558 
    559 .gifthunt-accordion__title span {
    560   display: inline-block;
    561   margin-right: 5px;
    562 }
    563 
    564 .gifthunt-accordion__info {
    565   border-bottom: 1px solid #eee;
    566   color: #888;
    567   margin: -15px -15px 10px;
    568   padding: .5rem 1rem;
    569 }
    570 
    571 .gifthunt-accordion__body {
    572   display: none;
    573   padding: 15px;
    574 }
    575 
    576 .gifthunt-accordion__section--active .gifthunt-accordion__title {
    577   background: #f5f5f5;
    578   cursor: default;
    579   font-weight: 400;
    580 }
    581 
    582 .gifthunt-accordion__section--active .gifthunt-accordion__title span {
    583   -webkit-transform: rotate(90deg);
    584           transform: rotate(90deg);
    585 }
    586 
    587 .gifthunt-accordion__section--active .gifthunt-accordion__body {
    588   display: block;
    589 }
    590 
    591 #gifthunt-send-test-success-email {
    592   max-width: 140px;
    593 }
    594 
    595 #gifthunt-success-email-list {
    596   list-style-type: square;
    597   margin-left: 20px;
    598 }
    599 
    600 #gifthunt-success-email-list li {
    601   margin-bottom: 20px;
    602 }
    603 
    604 #gifthunt-success-email-list li span {
    605   font-family: 'Courier New', Courier, monospace;
    606 }
    607 
    608 #gifthunt__icon-list {
    609   display: -webkit-box;
    610   display: -ms-flexbox;
    611   display: flex;
    612   -ms-flex-wrap: wrap;
    613       flex-wrap: wrap;
    614 }
    615 
    616 #gifthunt__icon-list label {
    617   -webkit-box-align: center;
    618       -ms-flex-align: center;
    619           align-items: center;
    620   display: -webkit-box;
    621   display: -ms-flexbox;
    622   display: flex;
    623   -webkit-box-orient: vertical;
    624   -webkit-box-direction: normal;
    625       -ms-flex-direction: column;
    626           flex-direction: column;
    627   margin: 10px 10px 10px 0;
    628 }
    629 
    630 #gifthunt__icon-list label .gifthunt-icon-preview {
    631   border: 2px solid #eee;
    632   border-radius: 3px;
    633   display: block;
    634   height: 70px;
    635   margin: 10px auto;
    636   width: 70px;
    637 }
    638 
    639 #gifthunt__icon-list label .gifthunt-icon-preview img {
    640   max-width: 70px;
    641   width: 100%;
    642 }
    643 
    644 #gifthunt__icon-list label .gifthunt-icon-preview:hover {
    645   border: 2px solid #ccc;
    646 }
    647 
    648 #gifthunt__icon-list label input[type="radio"]:checked + .gifthunt-icon-preview {
    649   border: 2px solid #007cb2;
    650 }
    651 
    652 #gifthunt__icon-upload-preview label {
    653   display: none;
    654 }
    655 
    656 #gifthunt__icon-upload-preview img {
    657   max-width: 70px;
    658 }
    659 
    660 #gifthunt__icon-upload-preview input[type="radio"]:checked + .gifthunt-icon-preview {
    661   border: 2px solid #007cb2;
    662 }
    663 
    664 #gifthunt__icon-upload .gifthunt__icon-upload-button-column {
    665   text-align: right;
    666 }
    667 
    668 #gifthunt__icon-animation-list {
    669   display: -webkit-box;
    670   display: -ms-flexbox;
    671   display: flex;
    672   -ms-flex-wrap: wrap;
    673       flex-wrap: wrap;
    674 }
    675 
    676 #gifthunt__icon-animation-list label {
    677   -webkit-box-align: center;
    678       -ms-flex-align: center;
    679           align-items: center;
    680   display: -webkit-box;
    681   display: -ms-flexbox;
    682   display: flex;
    683   -webkit-box-orient: vertical;
    684   -webkit-box-direction: normal;
    685       -ms-flex-direction: column;
    686           flex-direction: column;
    687   margin: 10px 10px 10px 0;
    688 }
    689 
    690 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview {
    691   border: 2px solid #eee;
    692   border-radius: 3px;
    693   display: block;
    694   height: 70px;
    695   margin: 10px auto;
    696   position: relative;
    697   width: 70px;
    698 }
    699 
    700 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview:hover {
    701   border: 2px solid #ccc;
    702 }
    703 
    704 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview span {
    705   background: #ddd;
    706   border-radius: 30px;
    707   display: block;
    708   height: 30px;
    709   margin: 20px auto;
    710   width: 30px;
    711 }
    712 
    713 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .pop {
    714   -webkit-animation-duration: 3s;
    715           animation-duration: 3s;
    716   -webkit-animation-iteration-count: infinite;
    717           animation-iteration-count: infinite;
    718   -webkit-animation-name: pop;
    719           animation-name: pop;
    720 }
    721 
    722 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .bounce {
    723   -webkit-animation-duration: 3s;
    724           animation-duration: 3s;
    725   -webkit-animation-iteration-count: infinite;
    726           animation-iteration-count: infinite;
    727   -webkit-animation-name: bounce;
    728           animation-name: bounce;
    729 }
    730 
    731 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .shake {
    732   -webkit-animation-duration: 3s;
    733           animation-duration: 3s;
    734   -webkit-animation-iteration-count: infinite;
    735           animation-iteration-count: infinite;
    736   -webkit-animation-name: shake;
    737           animation-name: shake;
    738 }
    739 
    740 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .fade_left {
    741   -webkit-animation-duration: 3s;
    742           animation-duration: 3s;
    743   -webkit-animation-iteration-count: infinite;
    744           animation-iteration-count: infinite;
    745   -webkit-animation-name: fade_left;
    746           animation-name: fade_left;
    747 }
    748 
    749 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .fade_right {
    750   -webkit-animation-duration: 3s;
    751           animation-duration: 3s;
    752   -webkit-animation-iteration-count: infinite;
    753           animation-iteration-count: infinite;
    754   -webkit-animation-name: fade_right;
    755           animation-name: fade_right;
    756 }
    757 
    758 #gifthunt__icon-animation-list label input[type="radio"]:checked + .gifthunt-icon-animation-preview {
    759   border: 2px solid #007cb2;
    760 }
    761 
    762 #gifthunt__icon-animation-list label input[type="radio"]:checked + .gifthunt-icon-animation-preview span {
    763   background: #555;
    764 }
    765 
    766 #gifthunt__popup-design-list {
    767   display: -webkit-box;
    768   display: -ms-flexbox;
    769   display: flex;
    770   -ms-flex-wrap: wrap;
    771       flex-wrap: wrap;
    772 }
    773 
    774 #gifthunt__popup-design-list label {
    775   -webkit-box-align: center;
    776       -ms-flex-align: center;
    777           align-items: center;
    778   display: -webkit-box;
    779   display: -ms-flexbox;
    780   display: flex;
    781   -webkit-box-orient: vertical;
    782   -webkit-box-direction: normal;
    783       -ms-flex-direction: column;
    784           flex-direction: column;
    785   margin: 10px 10px 10px 0;
    786 }
    787 
    788 #gifthunt__popup-design-list label .gifthunt-popup-design-preview {
    789   border: 2px solid #eee;
    790   border-radius: 3px;
    791   display: block;
    792   height: 120px;
    793   margin: 10px auto;
    794   padding: 5px;
    795   position: relative;
    796   width: 80px;
    797 }
    798 
    799 #gifthunt__popup-design-list label .gifthunt-popup-design-preview:hover {
    800   border: 2px solid #ccc;
    801 }
    802 
    803 #gifthunt__popup-design-list label .gifthunt-popup-design-preview img {
    804   width: 100%;
    805 }
    806 
    807 #gifthunt__popup-design-list label input[type="radio"]:checked + .gifthunt-popup-design-preview {
    808   border: 2px solid #007cb2;
    809 }
    810 
    811 #gifthunt__popup-design-list label input[type="radio"]:checked + .gifthunt-popup-design-preview span {
    812   background: #555;
    813 }
    814 
    815 #gifthunt__success-email-template-list {
    816   display: -webkit-box;
    817   display: -ms-flexbox;
    818   display: flex;
    819   -ms-flex-wrap: wrap;
    820       flex-wrap: wrap;
    821 }
    822 
    823 #gifthunt__success-email-template-list label {
    824   -webkit-box-align: center;
    825       -ms-flex-align: center;
    826           align-items: center;
    827   display: -webkit-box;
    828   display: -ms-flexbox;
    829   display: flex;
    830   -webkit-box-orient: vertical;
    831   -webkit-box-direction: normal;
    832       -ms-flex-direction: column;
    833           flex-direction: column;
    834   margin: 10px 10px 10px 0;
    835 }
    836 
    837 #gifthunt__success-email-template-list label .gifthunt-success-email-template-preview {
    838   border: 2px solid #eee;
    839   border-radius: 3px;
    840   display: block;
    841   height: 55px;
    842   margin: 10px auto;
    843   padding: 5px;
    844   position: relative;
    845   width: 80px;
    846 }
    847 
    848 #gifthunt__success-email-template-list label .gifthunt-success-email-template-preview:hover {
    849   border: 2px solid #ccc;
    850 }
    851 
    852 #gifthunt__success-email-template-list label .gifthunt-success-email-template-preview img {
    853   width: 100%;
    854 }
    855 
    856 #gifthunt__success-email-template-list label input[type="radio"]:checked + .gifthunt-popup-design-preview {
    857   border: 2px solid #007cb2;
    858 }
    859 
    860 #gifthunt__success-email-template-list label input[type="radio"]:checked + .gifthunt-popup-design-preview span {
    861   background: #555;
    862 }
    863 
    864 @-webkit-keyframes pop {
    865   0% {
    866     -webkit-transform: scale(0, 0);
    867             transform: scale(0, 0);
    868   }
    869   10% {
    870     -webkit-transform: scale(1.5, 1.5);
    871             transform: scale(1.5, 1.5);
    872   }
    873   15% {
    874     -webkit-transform: scale(0.5, 0.5);
    875             transform: scale(0.5, 0.5);
    876   }
    877   20% {
    878     -webkit-transform: scale(1.2, 1.2);
    879             transform: scale(1.2, 1.2);
    880   }
    881   25% {
    882     -webkit-transform: scale(0.8, 0.8);
    883             transform: scale(0.8, 0.8);
    884   }
    885   30% {
    886     -webkit-transform: scale(1, 1);
    887             transform: scale(1, 1);
    888   }
    889   89% {
    890     -webkit-transform: scale(1, 1);
    891             transform: scale(1, 1);
    892   }
    893   90% {
    894     -webkit-transform: scale(1.2, 1.2);
    895             transform: scale(1.2, 1.2);
    896   }
    897   100% {
    898     -webkit-transform: scale(1, 1);
    899             transform: scale(1, 1);
    900   }
    901 }
    902 
    903 @keyframes pop {
    904   0% {
    905     -webkit-transform: scale(0, 0);
    906             transform: scale(0, 0);
    907   }
    908   10% {
    909     -webkit-transform: scale(1.5, 1.5);
    910             transform: scale(1.5, 1.5);
    911   }
    912   15% {
    913     -webkit-transform: scale(0.5, 0.5);
    914             transform: scale(0.5, 0.5);
    915   }
    916   20% {
    917     -webkit-transform: scale(1.2, 1.2);
    918             transform: scale(1.2, 1.2);
    919   }
    920   25% {
    921     -webkit-transform: scale(0.8, 0.8);
    922             transform: scale(0.8, 0.8);
    923   }
    924   30% {
    925     -webkit-transform: scale(1, 1);
    926             transform: scale(1, 1);
    927   }
    928   89% {
    929     -webkit-transform: scale(1, 1);
    930             transform: scale(1, 1);
    931   }
    932   90% {
    933     -webkit-transform: scale(1.2, 1.2);
    934             transform: scale(1.2, 1.2);
    935   }
    936   100% {
    937     -webkit-transform: scale(1, 1);
    938             transform: scale(1, 1);
    939   }
    940 }
    941 
    942 @-webkit-keyframes bounce {
    943   0% {
    944     margin-top: 20px;
    945   }
    946   5% {
    947     margin-top: 0px;
    948   }
    949   10% {
    950     margin-top: 20px;
    951   }
    952   15% {
    953     margin-top: 5px;
    954   }
    955   20% {
    956     margin-top: 20px;
    957   }
    958   25% {
    959     margin-top: 10px;
    960   }
    961   30% {
    962     margin-top: 20px;
    963   }
    964   35% {
    965     margin-top: 15px;
    966   }
    967   40% {
    968     margin-top: 20px;
    969   }
    970 }
    971 
    972 @keyframes bounce {
    973   0% {
    974     margin-top: 20px;
    975   }
    976   5% {
    977     margin-top: 0px;
    978   }
    979   10% {
    980     margin-top: 20px;
    981   }
    982   15% {
    983     margin-top: 5px;
    984   }
    985   20% {
    986     margin-top: 20px;
    987   }
    988   25% {
    989     margin-top: 10px;
    990   }
    991   30% {
    992     margin-top: 20px;
    993   }
    994   35% {
    995     margin-top: 15px;
    996   }
    997   40% {
    998     margin-top: 20px;
    999   }
    1000 }
    1001 
    1002 @-webkit-keyframes shake {
    1003   0% {
    1004     margin-left: 20px;
    1005   }
    1006   5% {
    1007     margin-left: 5px;
    1008   }
    1009   10% {
    1010     margin-left: 35px;
    1011   }
    1012   15% {
    1013     margin-left: 10px;
    1014   }
    1015   20% {
    1016     margin-left: 30px;
    1017   }
    1018   25% {
    1019     margin-left: 15px;
    1020   }
    1021   30% {
    1022     margin-left: 25px;
    1023   }
    1024   35% {
    1025     margin-left: 20px;
    1026   }
    1027 }
    1028 
    1029 @keyframes shake {
    1030   0% {
    1031     margin-left: 20px;
    1032   }
    1033   5% {
    1034     margin-left: 5px;
    1035   }
    1036   10% {
    1037     margin-left: 35px;
    1038   }
    1039   15% {
    1040     margin-left: 10px;
    1041   }
    1042   20% {
    1043     margin-left: 30px;
    1044   }
    1045   25% {
    1046     margin-left: 15px;
    1047   }
    1048   30% {
    1049     margin-left: 25px;
    1050   }
    1051   35% {
    1052     margin-left: 20px;
    1053   }
    1054 }
    1055 
    1056 @-webkit-keyframes fade_left {
    1057   0% {
    1058     margin-left: 0;
    1059     opacity: 0;
    1060   }
    1061   30% {
    1062     margin-left: 25px;
    1063     opacity: 1;
    1064   }
    1065   35% {
    1066     margin-left: 20px;
    1067   }
    1068 }
    1069 
    1070 @keyframes fade_left {
    1071   0% {
    1072     margin-left: 0;
    1073     opacity: 0;
    1074   }
    1075   30% {
    1076     margin-left: 25px;
    1077     opacity: 1;
    1078   }
    1079   35% {
    1080     margin-left: 20px;
    1081   }
    1082 }
    1083 
    1084 @-webkit-keyframes fade_right {
    1085   0% {
    1086     margin-left: 40px;
    1087     opacity: 0;
    1088   }
    1089   30% {
    1090     margin-left: 15px;
    1091     opacity: 1;
    1092   }
    1093   35% {
    1094     margin-left: 20px;
    1095   }
    1096 }
    1097 
    1098 @keyframes fade_right {
    1099   0% {
    1100     margin-left: 40px;
    1101     opacity: 0;
    1102   }
    1103   30% {
    1104     margin-left: 15px;
    1105     opacity: 1;
    1106   }
    1107   35% {
    1108     margin-left: 20px;
    1109   }
    1110 }
    1111 
    1112 @media only screen and (max-width: 600px) {
    1113   .gifthunt-card__columns {
    1114     -webkit-box-orient: vertical;
    1115     -webkit-box-direction: normal;
    1116         -ms-flex-direction: column;
    1117             flex-direction: column;
    1118   }
    1119   .gifthunt-card__column {
    1120     padding: 0;
    1121   }
    1122 }
    1123 
    1124 .gifthunt-spin {
    1125   -webkit-animation: gifthunt_spin_animation 1s linear infinite;
    1126           animation: gifthunt_spin_animation 1s linear infinite;
    1127 }
    1128 
    1129 @-webkit-keyframes gifthunt_spin_animation {
    1130   100% {
    1131     -webkit-transform: rotate(360deg);
    1132     transform: rotate(360deg);
    1133   }
    1134 }
    1135 
    1136 @keyframes gifthunt_spin_animation {
    1137   100% {
    1138     -webkit-transform: rotate(360deg);
    1139     transform: rotate(360deg);
    1140   }
    1141 }
    1142 
    1143 .gifthunt-hunters-list .gifthunt-page-actions {
    1144   max-width: 100%;
    1145 }
    1146 
    1147 .gifthunt-hunters-list .gifthunt-page-actions--secondary {
    1148   -webkit-box-align: center;
    1149       -ms-flex-align: center;
    1150           align-items: center;
    1151   display: -webkit-box;
    1152   display: -ms-flexbox;
    1153   display: flex;
    1154 }
    1155 
    1156 .gifthunt-hunters-list .gifthunt-page-actions--secondary .button {
    1157   margin-left: 20px;
    1158 }
    1159 
    1160 .gifthunt-hunters-list .gifthunt-page-actions--header {
    1161   padding-bottom: 0;
    1162 }
    1163 
    1164 .gifthunt-hunters-list .button-delete-hunter {
    1165   font-weight: bold;
    1166 }
    1167 
    1168 .gifthunt-hunters-list .subsubsub {
    1169   margin: 0 0 10px;
    1170 }
    1171 
    1172 .gifthunt-hunters-list__empty-state {
    1173   clear: both;
    1174   color: #888;
    1175   display: block;
    1176   font-size: 16px;
    1177   font-style: italic;
    1178   padding: 10px 0;
    1179   text-align: center;
    1180 }
    1181 
    1182 .info--premium {
    1183   background: #fff5de;
    1184   padding: 10px;
    1185   border-radius: 3px;
    1186   border: 1px solid #e8b646;
    1187   text-decoration: none;
    1188   color: #555;
    1189 }
    1190 
    1191 .info--premium a {
    1192   color: #9f700b;
    1193   font-weight: bold;
    1194 }
    1195 
    1196 /**
    1197  * Fixed header CSS from default wp css
    1198  */
    1199 @media (min-width: 782px) {
    1200   body.js.is-fullscreen-mode .edit-post-header {
    1201     -webkit-transform: translateY(-100%);
    1202             transform: translateY(-100%);
    1203     -webkit-animation: edit-post-fullscreen-mode__slide-in-animation 0.1s forwards;
    1204             animation: edit-post-fullscreen-mode__slide-in-animation 0.1s forwards;
    1205   }
    1206 }
    1207 
    1208 @media (min-width: 782px) and (prefers-reduced-motion: reduce) {
    1209   body.js.is-fullscreen-mode .edit-post-header {
    1210     -webkit-animation-duration: 1ms !important;
    1211             animation-duration: 1ms !important;
    1212   }
    1213 }
    1214 
    1215 @-webkit-keyframes edit-post-fullscreen-mode__slide-in-animation {
    1216   100% {
    1217     -webkit-transform: translateY(0%);
    1218             transform: translateY(0%);
    1219   }
    1220 }
    1221 
    1222 @keyframes edit-post-fullscreen-mode__slide-in-animation {
    1223   100% {
    1224     -webkit-transform: translateY(0%);
    1225             transform: translateY(0%);
    1226   }
    1227 }
    1228 
    1229 .edit-post-header {
    1230   height: 50px;
    1231   padding: 0;
    1232   background: #f1f1f1;
    1233   display: -webkit-box;
    1234   display: -ms-flexbox;
    1235   display: flex;
    1236   z-index: 1100;
    1237   left: 0;
    1238   right: 0;
    1239   top: 0;
    1240   position: -webkit-sticky;
    1241   position: sticky;
    1242 }
    1243 
    1244 @media (min-width: 600px) {
    1245   .edit-post-header {
    1246     position: fixed;
    1247     padding: 5px 20px;
    1248     top: 46px;
    1249   }
    1250 }
    1251 
    1252 @media (min-width: 782px) {
    1253   .edit-post-header {
    1254     top: 32px;
    1255   }
    1256   body.is-fullscreen-mode .edit-post-header {
    1257     top: 0;
    1258   }
    1259 }
    1260 
    1261 .edit-post-header .editor-post-switch-to-draft + .editor-post-preview {
    1262   display: none;
    1263 }
    1264 
    1265 @media (min-width: 600px) {
    1266   .edit-post-header .editor-post-switch-to-draft + .editor-post-preview {
    1267     display: -webkit-inline-box;
    1268     display: -ms-inline-flexbox;
    1269     display: inline-flex;
    1270   }
    1271 }
    1272 
    1273 .edit-post-header > .edit-post-header__settings {
    1274   -webkit-box-ordinal-group: 2;
    1275       -ms-flex-order: 1;
    1276           order: 1;
    1277 }
    1278 
    1279 @supports ((position: -webkit-sticky) or (position: sticky)) {
    1280   .edit-post-header > .edit-post-header__settings {
    1281     -webkit-box-ordinal-group: initial;
    1282         -ms-flex-order: initial;
    1283             order: initial;
    1284   }
    1285 }
    1286 
    1287 .edit-post-header {
    1288   /* Set left position when auto-fold is not on the body element. */
    1289   left: 0;
    1290 }
    1291 
    1292 @media (min-width: 782px) {
    1293   .edit-post-header {
    1294     left: 160px;
    1295   }
    1296 }
    1297 
    1298 @media (min-width: 782px) {
    1299   .auto-fold .edit-post-header {
    1300     left: 36px;
    1301   }
    1302 }
    1303 
    1304 @media (min-width: 960px) {
    1305   .auto-fold .edit-post-header {
    1306     left: 160px;
    1307   }
    1308 }
    1309 
    1310 /* Sidebar manually collapsed. */
    1311 .folded .edit-post-header {
    1312   left: 0;
    1313 }
    1314 
    1315 @media (min-width: 782px) {
    1316   .folded .edit-post-header {
    1317     left: 36px;
    1318   }
    1319 }
    1320 
    1321 /* Mobile menu opened. */
    1322 @media (max-width: 782px) {
    1323   .auto-fold .wp-responsive-open .edit-post-header {
    1324     left: 190px;
    1325   }
    1326 }
    1327 
    1328 /* In small screens with responsive menu expanded there is small white space. */
    1329 @media (max-width: 600px) {
    1330   .auto-fold .wp-responsive-open .edit-post-header {
    1331     margin-left: -18px;
    1332   }
    1333 }
    1334 
    1335 body.is-fullscreen-mode .edit-post-header {
    1336   left: 0 !important;
    1337 }
    1338 
    1339 .edit-post-header__settings {
    1340   display: -webkit-inline-box;
    1341   display: -ms-inline-flexbox;
    1342   display: inline-flex;
    1343   -webkit-box-align: center;
    1344       -ms-flex-align: center;
    1345           align-items: center;
    1346 }
    1347 
    1348 .edit-post-header .components-button.is-toggled {
    1349   color: #fff;
    1350   background: #555d66;
    1351   margin: 1px;
    1352   padding: 7px;
    1353 }
    1354 
    1355 .edit-post-header .components-button.is-toggled:hover, .edit-post-header .components-button.is-toggled:focus {
    1356   -webkit-box-shadow: 0 0 0 1px #555d66, inset 0 0 0 1px #fff !important;
    1357           box-shadow: 0 0 0 1px #555d66, inset 0 0 0 1px #fff !important;
    1358   color: #fff !important;
    1359   background: #555d66 !important;
    1360 }
    1361 
    1362 .edit-post-header .components-button.editor-post-save-draft, .edit-post-header .components-button.editor-post-switch-to-draft, .edit-post-header .components-button.editor-post-preview, .edit-post-header .components-button.editor-post-publish-button, .edit-post-header .components-button.editor-post-publish-panel__toggle {
    1363   margin: 2px;
    1364   height: 33px;
    1365   line-height: 32px;
    1366   font-size: 13px;
    1367 }
    1368 
    1369 .edit-post-header .components-button.editor-post-save-draft, .edit-post-header .components-button.editor-post-switch-to-draft {
    1370   padding: 0 5px;
    1371 }
    1372 
    1373 @media (min-width: 600px) {
    1374   .edit-post-header .components-button.editor-post-save-draft, .edit-post-header .components-button.editor-post-switch-to-draft {
    1375     padding: 0 12px;
    1376   }
    1377 }
    1378 
    1379 .edit-post-header .components-button.editor-post-preview, .edit-post-header .components-button.editor-post-publish-button, .edit-post-header .components-button.editor-post-publish-panel__toggle {
    1380   padding: 0 5px 2px;
    1381 }
    1382 
    1383 @media (min-width: 600px) {
    1384   .edit-post-header .components-button.editor-post-preview, .edit-post-header .components-button.editor-post-publish-button, .edit-post-header .components-button.editor-post-publish-panel__toggle {
    1385     padding: 0 12px 2px;
    1386   }
    1387 }
    1388 
    1389 @media (min-width: 782px) {
    1390   .edit-post-header .components-button.editor-post-preview {
    1391     margin: 0 3px 0 12px;
    1392   }
    1393   .edit-post-header .components-button.editor-post-publish-button, .edit-post-header .components-button.editor-post-publish-panel__toggle {
    1394     margin: 0 12px 0 3px;
    1395   }
    1396 }
    1397 
    1398 .edit-post-fullscreen-mode-close__toolbar {
    1399   display: none;
    1400 }
    1401 
    1402 @media (min-width: 782px) {
    1403   .edit-post-fullscreen-mode-close__toolbar {
    1404     display: block;
    1405     border-top: 0;
    1406     border-bottom: 0;
    1407     border-left: 0;
    1408     margin: -9px 10px -9px -10px;
    1409     padding: 9px 10px;
    1410   }
    1411 }
    1412 
    1413 .edit-post-header-toolbar {
    1414   display: -webkit-inline-box;
    1415   display: -ms-inline-flexbox;
    1416   display: inline-flex;
    1417   -webkit-box-align: center;
    1418       -ms-flex-align: center;
    1419           align-items: center;
    1420 }
    1421 
    1422 .edit-post-header-toolbar > .components-button {
    1423   display: none;
    1424 }
    1425 
    1426 @media (min-width: 600px) {
    1427   .edit-post-header-toolbar > .components-button {
    1428     display: -webkit-inline-box;
    1429     display: -ms-inline-flexbox;
    1430     display: inline-flex;
    1431   }
    1432 }
    1433 
    1434 .edit-post-header-toolbar .block-editor-block-navigation,
    1435 .edit-post-header-toolbar .table-of-contents {
    1436   display: none;
    1437 }
    1438 
    1439 @media (min-width: 600px) {
    1440   .edit-post-header-toolbar .block-editor-block-navigation,
    1441   .edit-post-header-toolbar .table-of-contents {
    1442     display: -webkit-box;
    1443     display: -ms-flexbox;
    1444     display: flex;
    1445   }
    1446 }
    1447 
    1448 .edit-post-header-toolbar__block-toolbar {
    1449   position: absolute;
    1450   top: 56px;
    1451   left: 0;
    1452   right: 0;
    1453   background: #fff;
    1454   min-height: 37px;
    1455   border-bottom: 1px solid #e2e4e7;
    1456 }
    1457 
    1458 .edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar .components-toolbar {
    1459   border-top: none;
    1460   border-bottom: none;
    1461 }
    1462 
    1463 .is-sidebar-opened .edit-post-header-toolbar__block-toolbar {
    1464   display: none;
    1465 }
    1466 
    1467 @media (min-width: 782px) {
    1468   .is-sidebar-opened .edit-post-header-toolbar__block-toolbar {
    1469     display: block;
    1470     right: 280px;
    1471   }
    1472 }
    1473 
    1474 @media (min-width: 1080px) {
    1475   .edit-post-header-toolbar__block-toolbar {
    1476     padding-left: 8px;
    1477     position: static;
    1478     left: auto;
    1479     right: auto;
    1480     background: none;
    1481     border-bottom: none;
    1482     min-height: auto;
    1483   }
    1484   .is-sidebar-opened .edit-post-header-toolbar__block-toolbar {
    1485     right: auto;
    1486   }
    1487   .edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar {
    1488     margin: -9px 0;
    1489   }
    1490   .edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar .components-toolbar {
    1491     padding: 10px 4px 9px;
    1492   }
    1493 }
    1494 /*# sourceMappingURL=gifthunt.css.map */
     1.gifthunt-badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1.5;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out}.gifthunt-badge--active{color:#fff;background-color:#28a745}.gifthunt-badge--inactive{color:#212529;background-color:#f8f9fa}.gifthunt-helptext{color:#888;margin:2rem auto;text-align:center}.gifthunt-helptext p{border:1px solid #ddd;border-radius:2rem;display:inline-block;padding:1rem 2rem}.gifthunt-helptext__icon{display:inline-block;height:1rem;margin:0 1rem 0 0;width:1rem}.gifthunt-helptext__icon svg{display:block;fill:#0073aa;margin-top:2px}.gifthunt-external-link-icon{display:inline-block;height:1rem;width:1rem;max-height:100%;max-width:100%;margin:auto}.gifthunt-external-link-icon svg{display:block;fill:#0073aa;margin-top:4px}.gifthunt-form{display:-webkit-box;display:-ms-flexbox;display:flex;margin-top:60px;max-width:900px}.gifthunt-form__form{-webkit-box-flex:2;-ms-flex:2;flex:2}.gifthunt-form__sidebar{-webkit-box-flex:1;-ms-flex:1;flex:1;padding-left:20px}.gifthunt-form-result{margin:10px 0;position:relative}.gifthunt-form-result--error{background-color:#f9e2e2;border-left:3px solid #d94f4f}.gifthunt-form-result--success{background-color:#eff9f1;border-left:3px solid #4ab866}.gifthunt-form-result__content{margin:1em 25px 1em 0;padding:20px 12px}.gifthunt-form-result__content ul{list-style:disc;margin:20px 0 20px 20px}.gifthunt-form-result__content ul li{margin:0 0 15px 10px;padding:0 0 0 5px}.gifthunt-form-result__modal{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:rgba(0,0,0,0.5);display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;left:0;overflow-y:auto;position:fixed;top:0;width:100%;z-index:10000}.gifthunt-form-result__modal-content{margin:0 auto;max-width:500px;width:100%}.gifthunt-form-result__modal.hidden{display:none}.gifthunt-form-result__close-button{background:none;border:none;cursor:pointer;font-size:18px;height:30px;position:absolute;right:0;top:0;width:30px}.gifthunt-form__delete-confirm-modal,.gifthunt-form__test-mail-modal,.gifthunt-form__delete-hunter-confirm-modal,.gifthunt-form__success-email-template-preview-modal{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:rgba(0,0,0,0.5);display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;left:0;overflow-y:auto;position:fixed;top:0;width:100%;z-index:10000}.gifthunt-form__delete-confirm-modal-content,.gifthunt-form__test-mail-modal-content,.gifthunt-form__delete-hunter-confirm-modal-content,.gifthunt-form__success-email-template-preview-modal-content{background:#fff;border-radius:3px;-webkit-box-shadow:0 10px 20px rgba(0,0,0,0.5);box-shadow:0 10px 20px rgba(0,0,0,0.5);margin:0 auto;max-width:500px;position:relative;width:100%}.gifthunt-form__delete-confirm-modal-content h3,.gifthunt-form__test-mail-modal-content h3,.gifthunt-form__delete-hunter-confirm-modal-content h3,.gifthunt-form__success-email-template-preview-modal-content h3{border-bottom:1px solid #eee;margin:0 0 20px 0;padding:20px}.gifthunt-form__delete-confirm-modal-content p,.gifthunt-form__test-mail-modal-content p,.gifthunt-form__delete-hunter-confirm-modal-content p,.gifthunt-form__success-email-template-preview-modal-content p{border-bottom:1px solid #eee;margin:0 0 20px 0;padding:0 20px 20px}.gifthunt-form__delete-confirm-modal-content label,.gifthunt-form__delete-confirm-modal-content input,.gifthunt-form__test-mail-modal-content label,.gifthunt-form__test-mail-modal-content input,.gifthunt-form__delete-hunter-confirm-modal-content label,.gifthunt-form__delete-hunter-confirm-modal-content input,.gifthunt-form__success-email-template-preview-modal-content label,.gifthunt-form__success-email-template-preview-modal-content input{margin:0 20px}.gifthunt-form__delete-confirm-modal-content input,.gifthunt-form__test-mail-modal-content input,.gifthunt-form__delete-hunter-confirm-modal-content input,.gifthunt-form__success-email-template-preview-modal-content input{margin-bottom:10px}.gifthunt-form__delete-confirm-modal__close-button,.gifthunt-form__test-mail-modal__close-button,.gifthunt-form__delete-hunter-confirm-modal__close-button,.gifthunt-form__success-email-template-preview-modal__close-button{background:none;border:none;cursor:pointer;font-size:18px;height:30px;position:absolute;right:0;top:0;width:30px}.gifthunt-form__delete-confirm-actions,.gifthunt-form__test-mail-actions{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0 20px 20px}.gifthunt-form__delete-confirm-modal.hidden,.gifthunt-form__test-mail-modal.hidden,.gifthunt-form__delete-hunter-confirm-modal.hidden,.gifthunt-form__success-email-template-preview-modal.hidden{display:none}.gifthunt-form__popup-design-preview-modal{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:rgba(0,0,0,0.8);display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;left:0;overflow-y:scroll;position:fixed;top:0;width:100%;z-index:99999}.gifthunt-form__popup-design-preview-modal img{border-radius:3px;-webkit-box-shadow:0px 0px 30px rgba(0,0,0,0.8);box-shadow:0px 0px 30px rgba(0,0,0,0.8);cursor:pointer}.gifthunt-form__popup-design-preview-modal.hidden{display:none}.gifthunt-form__success-email-template-preview-modal-body{border-bottom:1px solid #eee;margin-bottom:15px;padding:0 15px 15px}.gifthunt-form__success-email-template-preview-modal-body img{width:100%}.gifthunt-card{background:#fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);box-shadow:0 1px 1px rgba(0,0,0,0.04);margin:10px 0;padding:0}.gifthunt-card__columns{display:-webkit-box;display:-ms-flexbox;display:flex}.gifthunt-card__column{-webkit-box-flex:1;-ms-flex:1;flex:1;padding:0 20px 0 0}.gifthunt-card__column:last-child{padding-right:0}.gifthunt-card__title{margin:0;padding:0}.gifthunt-card__section{border-bottom:1px solid #eee;padding:20px}.gifthunt-card__section--secondary{background:#f5f5f5;border-bottom:1px solid #e3e3e3}.gifthunt-card__section--closed,.gifthunt-card__section--opened{padding:0}.gifthunt-card__section--closed .gifthunt-form-group__label,.gifthunt-card__section--opened .gifthunt-form-group__label{padding:10px 0 10px 10px}.gifthunt-card__section--closed .gifthunt-form-group__label span,.gifthunt-card__section--opened .gifthunt-form-group__label span{display:inline-block;margin-right:10px}.gifthunt-card__section--closed .gifthunt-form-group__body,.gifthunt-card__section--opened .gifthunt-form-group__body{padding:20px}.gifthunt-card__section--closed .gifthunt-form-group__label{background:#ebebeb;border-bottom:1px solid #eee}.gifthunt-card__section--closed .gifthunt-form-group__body{display:none}.gifthunt-card__section--opened .gifthunt-form-group__label{background:#f5f5f5;border-bottom:1px solid #eee}.gifthunt-card__section--opened .gifthunt-form-group__label span{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.gifthunt-card__section--opened .gifthunt-form-group__body{display:block}.gifthunt-card__section:last-child{border-bottom:none}.gifthunt-form-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:0 auto 1.5rem}.gifthunt-form-group__label{cursor:pointer;font-size:.9rem;font-weight:bold;line-height:2rem}.gifthunt-form-group label{cursor:pointer;line-height:2rem}.gifthunt-form-group input[type="text"],.gifthunt-form-group input[type="email"],.gifthunt-form-group input[type="number"],.gifthunt-form-group input[type="url"]{height:2.5rem;line-height:2.5rem}.gifthunt-form-group input::-webkit-input-placeholder{color:#c2c2c2;font-style:italic}.gifthunt-form-group input:-ms-input-placeholder{color:#c2c2c2;font-style:italic}.gifthunt-form-group input::-ms-input-placeholder{color:#c2c2c2;font-style:italic}.gifthunt-form-group input::placeholder{color:#c2c2c2;font-style:italic}.gifthunt-form-group input.gifthunt-field-error{background-color:#fbeae5;border-color:#bf0711}.gifthunt-form-group textarea.gifthunt-field-error{background-color:#fbeae5;border-color:#bf0711}.gifthunt-form-group__help-text{color:#888;margin:.5rem 0;padding:0}.gifthunt-form-group__body label{display:block}.gifthunt-form-group:last-child{margin-bottom:0}.gifthunt-input-group{display:-webkit-box;display:-ms-flexbox;display:flex}.gifthunt-input-group input{-webkit-box-flex:1;-ms-flex:1;flex:1}.gifthunt-input-group button{height:2.5rem !important;line-height:2.5rem !important;margin-left:20px !important;color:#bf0711 !important}.gifthunt--hidden{display:none}.gifthunt-page-actions{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-top:1px solid #ccc;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin:20px 0;max-width:900px;padding:20px 0}.gifthunt-page-actions--header{border-top:none;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;margin:0;padding:10px 0}.gifthunt-page-actions--header .button{margin-left:20px}.gifthunt-page-actions--header h1{width:100%}.gifthunt-page-actions--header h1 small{font-size:13px}.gifthunt-button i{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;height:100%}.gifthunt-button i svg{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.gifthunt-button i.hidden{display:none}.gifthunt-button--link{color:#888;line-height:3rem;text-decoration:none}.gifthunt-button--danger{background:#bf0711 !important;border-color:#bf0711 !important;color:#fff !important}.gifthunt-button--danger:hover{background:#a1030b !important;border-color:#6d0308 !important}.gifthunt-button--danger:disabled.button,.gifthunt-button--danger[disabled].button{background:#a1030b !important;border-color:#6d0308 !important;color:#fff !important;text-shadow:none !important;opacity:.8}.gifthunt-error-message{color:#bf0711;line-height:1.5rem}.gifthunt-accordion{border:1px solid #eee}.gifthunt-accordion__title{background:#ebebeb;border-bottom:1px solid #eee;color:#555;cursor:pointer;font-size:14px;font-weight:700;line-height:40px;margin:0;padding:0 0 0 10px}.gifthunt-accordion__title span{display:inline-block;margin-right:5px}.gifthunt-accordion__info{border-bottom:1px solid #eee;color:#888;margin:-15px -15px 10px;padding:.5rem 1rem}.gifthunt-accordion__body{display:none;padding:15px}.gifthunt-accordion__section--active .gifthunt-accordion__title{background:#f5f5f5;cursor:default;font-weight:400}.gifthunt-accordion__section--active .gifthunt-accordion__title span{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.gifthunt-accordion__section--active .gifthunt-accordion__body{display:block}#gifthunt-send-test-success-email{max-width:140px}#gifthunt-success-email-list{list-style-type:square;margin-left:20px}#gifthunt-success-email-list li{margin-bottom:20px}#gifthunt-success-email-list li span{font-family:'Courier New', Courier, monospace}#gifthunt__icon-list{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}#gifthunt__icon-list label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:10px 10px 10px 0}#gifthunt__icon-list label .gifthunt-icon-preview{border:2px solid #eee;border-radius:3px;display:block;height:70px;margin:10px auto;width:70px}#gifthunt__icon-list label .gifthunt-icon-preview img{max-width:70px;width:100%}#gifthunt__icon-list label .gifthunt-icon-preview:hover{border:2px solid #ccc}#gifthunt__icon-list label input[type="radio"]:checked+.gifthunt-icon-preview{border:2px solid #007cb2}#gifthunt__icon-upload-preview label{display:none}#gifthunt__icon-upload-preview img{max-width:70px}#gifthunt__icon-upload-preview input[type="radio"]:checked+.gifthunt-icon-preview{border:2px solid #007cb2}#gifthunt__icon-upload .gifthunt__icon-upload-button-column{text-align:right}#gifthunt__icon-animation-list{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}#gifthunt__icon-animation-list label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:10px 10px 10px 0}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview{border:2px solid #eee;border-radius:3px;display:block;height:70px;margin:10px auto;position:relative;width:70px}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview:hover{border:2px solid #ccc}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview span{background:#ddd;border-radius:30px;display:block;height:30px;margin:20px auto;width:30px}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .pop{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:pop;animation-name:pop}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .bounce{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:bounce;animation-name:bounce}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .shake{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:shake;animation-name:shake}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .fade_left{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:fade_left;animation-name:fade_left}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .fade_right{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:fade_right;animation-name:fade_right}#gifthunt__icon-animation-list label input[type="radio"]:checked+.gifthunt-icon-animation-preview{border:2px solid #007cb2}#gifthunt__icon-animation-list label input[type="radio"]:checked+.gifthunt-icon-animation-preview span{background:#555}#gifthunt__popup-design-list{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}#gifthunt__popup-design-list label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:10px 10px 10px 0}#gifthunt__popup-design-list label .gifthunt-popup-design-preview{border:2px solid #eee;border-radius:3px;display:block;height:120px;margin:10px auto;padding:5px;position:relative;width:80px}#gifthunt__popup-design-list label .gifthunt-popup-design-preview:hover{border:2px solid #ccc}#gifthunt__popup-design-list label .gifthunt-popup-design-preview img{width:100%}#gifthunt__popup-design-list label input[type="radio"]:checked+.gifthunt-popup-design-preview{border:2px solid #007cb2}#gifthunt__popup-design-list label input[type="radio"]:checked+.gifthunt-popup-design-preview span{background:#555}#gifthunt__success-email-template-list{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}#gifthunt__success-email-template-list label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:10px 10px 10px 0}#gifthunt__success-email-template-list label .gifthunt-success-email-template-preview{border:2px solid #eee;border-radius:3px;display:block;height:55px;margin:10px auto;padding:5px;position:relative;width:80px}#gifthunt__success-email-template-list label .gifthunt-success-email-template-preview:hover{border:2px solid #ccc}#gifthunt__success-email-template-list label .gifthunt-success-email-template-preview img{width:100%}#gifthunt__success-email-template-list label input[type="radio"]:checked+.gifthunt-popup-design-preview{border:2px solid #007cb2}#gifthunt__success-email-template-list label input[type="radio"]:checked+.gifthunt-popup-design-preview span{background:#555}@-webkit-keyframes pop{0%{-webkit-transform:scale(0, 0);transform:scale(0, 0)}10%{-webkit-transform:scale(1.5, 1.5);transform:scale(1.5, 1.5)}15%{-webkit-transform:scale(0.5, 0.5);transform:scale(0.5, 0.5)}20%{-webkit-transform:scale(1.2, 1.2);transform:scale(1.2, 1.2)}25%{-webkit-transform:scale(0.8, 0.8);transform:scale(0.8, 0.8)}30%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}89%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}90%{-webkit-transform:scale(1.2, 1.2);transform:scale(1.2, 1.2)}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}}@keyframes pop{0%{-webkit-transform:scale(0, 0);transform:scale(0, 0)}10%{-webkit-transform:scale(1.5, 1.5);transform:scale(1.5, 1.5)}15%{-webkit-transform:scale(0.5, 0.5);transform:scale(0.5, 0.5)}20%{-webkit-transform:scale(1.2, 1.2);transform:scale(1.2, 1.2)}25%{-webkit-transform:scale(0.8, 0.8);transform:scale(0.8, 0.8)}30%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}89%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}90%{-webkit-transform:scale(1.2, 1.2);transform:scale(1.2, 1.2)}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}}@-webkit-keyframes bounce{0%{margin-top:20px}5%{margin-top:0px}10%{margin-top:20px}15%{margin-top:5px}20%{margin-top:20px}25%{margin-top:10px}30%{margin-top:20px}35%{margin-top:15px}40%{margin-top:20px}}@keyframes bounce{0%{margin-top:20px}5%{margin-top:0px}10%{margin-top:20px}15%{margin-top:5px}20%{margin-top:20px}25%{margin-top:10px}30%{margin-top:20px}35%{margin-top:15px}40%{margin-top:20px}}@-webkit-keyframes shake{0%{margin-left:20px}5%{margin-left:5px}10%{margin-left:35px}15%{margin-left:10px}20%{margin-left:30px}25%{margin-left:15px}30%{margin-left:25px}35%{margin-left:20px}}@keyframes shake{0%{margin-left:20px}5%{margin-left:5px}10%{margin-left:35px}15%{margin-left:10px}20%{margin-left:30px}25%{margin-left:15px}30%{margin-left:25px}35%{margin-left:20px}}@-webkit-keyframes fade_left{0%{margin-left:0;opacity:0}30%{margin-left:25px;opacity:1}35%{margin-left:20px}}@keyframes fade_left{0%{margin-left:0;opacity:0}30%{margin-left:25px;opacity:1}35%{margin-left:20px}}@-webkit-keyframes fade_right{0%{margin-left:40px;opacity:0}30%{margin-left:15px;opacity:1}35%{margin-left:20px}}@keyframes fade_right{0%{margin-left:40px;opacity:0}30%{margin-left:15px;opacity:1}35%{margin-left:20px}}@media only screen and (max-width: 600px){.gifthunt-card__columns{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.gifthunt-card__column{padding:0}}.gifthunt-spin{-webkit-animation:gifthunt_spin_animation 1s linear infinite;animation:gifthunt_spin_animation 1s linear infinite}@-webkit-keyframes gifthunt_spin_animation{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes gifthunt_spin_animation{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.gifthunt-hunters-list .gifthunt-page-actions{max-width:100%}.gifthunt-hunters-list .gifthunt-page-actions--secondary{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.gifthunt-hunters-list .gifthunt-page-actions--secondary .button{margin-left:20px}.gifthunt-hunters-list .gifthunt-page-actions--header{padding-bottom:0}.gifthunt-hunters-list .button-delete-hunter{font-weight:bold}.gifthunt-hunters-list .subsubsub{margin:0 0 10px}.gifthunt-hunters-list__empty-state{clear:both;color:#888;display:block;font-size:16px;font-style:italic;padding:10px 0;text-align:center}.info--premium{background:#fff5de;padding:10px;border-radius:3px;border:1px solid #e8b646;text-decoration:none;color:#555}.info--premium a{color:#9f700b;font-weight:bold}@media (min-width: 782px){body.js.is-fullscreen-mode .edit-post-header{-webkit-transform:translateY(-100%);transform:translateY(-100%);-webkit-animation:edit-post-fullscreen-mode__slide-in-animation 0.1s forwards;animation:edit-post-fullscreen-mode__slide-in-animation 0.1s forwards}}@media (min-width: 782px) and (prefers-reduced-motion: reduce){body.js.is-fullscreen-mode .edit-post-header{-webkit-animation-duration:1ms !important;animation-duration:1ms !important}}@-webkit-keyframes edit-post-fullscreen-mode__slide-in-animation{100%{-webkit-transform:translateY(0%);transform:translateY(0%)}}@keyframes edit-post-fullscreen-mode__slide-in-animation{100%{-webkit-transform:translateY(0%);transform:translateY(0%)}}.edit-post-header{height:50px;padding:0;background:#f1f1f1;display:-webkit-box;display:-ms-flexbox;display:flex;z-index:1100;left:0;right:0;top:0;position:-webkit-sticky;position:sticky}@media (min-width: 600px){.edit-post-header{position:fixed;padding:5px 20px;top:46px}}@media (min-width: 782px){.edit-post-header{top:32px}body.is-fullscreen-mode .edit-post-header{top:0}}.edit-post-header .editor-post-switch-to-draft+.editor-post-preview{display:none}@media (min-width: 600px){.edit-post-header .editor-post-switch-to-draft+.editor-post-preview{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}}.edit-post-header>.edit-post-header__settings{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}@supports ((position: -webkit-sticky) or (position: sticky)){.edit-post-header>.edit-post-header__settings{-webkit-box-ordinal-group:initial;-ms-flex-order:initial;order:initial}}.edit-post-header{left:0}@media (min-width: 782px){.edit-post-header{left:160px}}@media (min-width: 782px){.auto-fold .edit-post-header{left:36px}}@media (min-width: 960px){.auto-fold .edit-post-header{left:160px}}.folded .edit-post-header{left:0}@media (min-width: 782px){.folded .edit-post-header{left:36px}}@media (max-width: 782px){.auto-fold .wp-responsive-open .edit-post-header{left:190px}}@media (max-width: 600px){.auto-fold .wp-responsive-open .edit-post-header{margin-left:-18px}}body.is-fullscreen-mode .edit-post-header{left:0 !important}.edit-post-header__settings{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.edit-post-header .components-button.is-toggled{color:#fff;background:#555d66;margin:1px;padding:7px}.edit-post-header .components-button.is-toggled:hover,.edit-post-header .components-button.is-toggled:focus{-webkit-box-shadow:0 0 0 1px #555d66, inset 0 0 0 1px #fff !important;box-shadow:0 0 0 1px #555d66, inset 0 0 0 1px #fff !important;color:#fff !important;background:#555d66 !important}.edit-post-header .components-button.editor-post-save-draft,.edit-post-header .components-button.editor-post-switch-to-draft,.edit-post-header .components-button.editor-post-preview,.edit-post-header .components-button.editor-post-publish-button,.edit-post-header .components-button.editor-post-publish-panel__toggle{margin:2px;height:33px;line-height:32px;font-size:13px}.edit-post-header .components-button.editor-post-save-draft,.edit-post-header .components-button.editor-post-switch-to-draft{padding:0 5px}@media (min-width: 600px){.edit-post-header .components-button.editor-post-save-draft,.edit-post-header .components-button.editor-post-switch-to-draft{padding:0 12px}}.edit-post-header .components-button.editor-post-preview,.edit-post-header .components-button.editor-post-publish-button,.edit-post-header .components-button.editor-post-publish-panel__toggle{padding:0 5px 2px}@media (min-width: 600px){.edit-post-header .components-button.editor-post-preview,.edit-post-header .components-button.editor-post-publish-button,.edit-post-header .components-button.editor-post-publish-panel__toggle{padding:0 12px 2px}}@media (min-width: 782px){.edit-post-header .components-button.editor-post-preview{margin:0 3px 0 12px}.edit-post-header .components-button.editor-post-publish-button,.edit-post-header .components-button.editor-post-publish-panel__toggle{margin:0 12px 0 3px}}.edit-post-fullscreen-mode-close__toolbar{display:none}@media (min-width: 782px){.edit-post-fullscreen-mode-close__toolbar{display:block;border-top:0;border-bottom:0;border-left:0;margin:-9px 10px -9px -10px;padding:9px 10px}}.edit-post-header-toolbar{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.edit-post-header-toolbar>.components-button{display:none}@media (min-width: 600px){.edit-post-header-toolbar>.components-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}}.edit-post-header-toolbar .block-editor-block-navigation,.edit-post-header-toolbar .table-of-contents{display:none}@media (min-width: 600px){.edit-post-header-toolbar .block-editor-block-navigation,.edit-post-header-toolbar .table-of-contents{display:-webkit-box;display:-ms-flexbox;display:flex}}.edit-post-header-toolbar__block-toolbar{position:absolute;top:56px;left:0;right:0;background:#fff;min-height:37px;border-bottom:1px solid #e2e4e7}.edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar .components-toolbar{border-top:none;border-bottom:none}.is-sidebar-opened .edit-post-header-toolbar__block-toolbar{display:none}@media (min-width: 782px){.is-sidebar-opened .edit-post-header-toolbar__block-toolbar{display:block;right:280px}}@media (min-width: 1080px){.edit-post-header-toolbar__block-toolbar{padding-left:8px;position:static;left:auto;right:auto;background:none;border-bottom:none;min-height:auto}.is-sidebar-opened .edit-post-header-toolbar__block-toolbar{right:auto}.edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar{margin:-9px 0}.edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar .components-toolbar{padding:10px 4px 9px}}
  • gift-hunt/tags/1.0.3/assets/css/gifthunt.css

    r2330816 r2409806  
    1 .gifthunt-badge {
    2   display: inline-block;
    3   padding: .25em .4em;
    4   font-size: 75%;
    5   font-weight: 700;
    6   line-height: 1.5;
    7   text-align: center;
    8   white-space: nowrap;
    9   vertical-align: baseline;
    10   border-radius: .25rem;
    11   -webkit-transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;
    12   transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;
    13   transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    14   transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;
    15 }
    16 
    17 .gifthunt-badge--active {
    18   color: #fff;
    19   background-color: #28a745;
    20 }
    21 
    22 .gifthunt-badge--inactive {
    23   color: #212529;
    24   background-color: #f8f9fa;
    25 }
    26 
    27 .gifthunt-helptext {
    28   color: #888;
    29   margin: 2rem auto;
    30   text-align: center;
    31 }
    32 
    33 .gifthunt-helptext p {
    34   border: 1px solid #ddd;
    35   border-radius: 2rem;
    36   display: inline-block;
    37   padding: 1rem 2rem;
    38 }
    39 
    40 .gifthunt-helptext__icon {
    41   display: inline-block;
    42   height: 1rem;
    43   margin: 0 1rem 0 0;
    44   width: 1rem;
    45 }
    46 
    47 .gifthunt-helptext__icon svg {
    48   display: block;
    49   fill: #0073aa;
    50   margin-top: 2px;
    51 }
    52 
    53 .gifthunt-external-link-icon {
    54   display: inline-block;
    55   height: 1rem;
    56   width: 1rem;
    57   max-height: 100%;
    58   max-width: 100%;
    59   margin: auto;
    60 }
    61 
    62 .gifthunt-external-link-icon svg {
    63   display: block;
    64   fill: #0073aa;
    65   margin-top: 4px;
    66 }
    67 
    68 .gifthunt-form {
    69   display: -webkit-box;
    70   display: -ms-flexbox;
    71   display: flex;
    72   margin-top: 60px;
    73   max-width: 900px;
    74 }
    75 
    76 .gifthunt-form__form {
    77   -webkit-box-flex: 2;
    78       -ms-flex: 2;
    79           flex: 2;
    80 }
    81 
    82 .gifthunt-form__sidebar {
    83   -webkit-box-flex: 1;
    84       -ms-flex: 1;
    85           flex: 1;
    86   padding-left: 20px;
    87 }
    88 
    89 .gifthunt-form-result {
    90   margin: 10px 0;
    91   position: relative;
    92 }
    93 
    94 .gifthunt-form-result--error {
    95   background-color: #f9e2e2;
    96   border-left: 3px solid #d94f4f;
    97 }
    98 
    99 .gifthunt-form-result--success {
    100   background-color: #eff9f1;
    101   border-left: 3px solid #4ab866;
    102 }
    103 
    104 .gifthunt-form-result__content {
    105   margin: 1em 25px 1em 0;
    106   padding: 20px 12px;
    107 }
    108 
    109 .gifthunt-form-result__content ul {
    110   list-style: disc;
    111   margin: 20px 0 20px 20px;
    112 }
    113 
    114 .gifthunt-form-result__content ul li {
    115   margin: 0 0 15px 10px;
    116   padding: 0 0 0 5px;
    117 }
    118 
    119 .gifthunt-form-result__modal {
    120   -webkit-box-align: center;
    121       -ms-flex-align: center;
    122           align-items: center;
    123   background: rgba(0, 0, 0, 0.5);
    124   display: -webkit-box;
    125   display: -ms-flexbox;
    126   display: flex;
    127   height: 100%;
    128   -webkit-box-pack: center;
    129       -ms-flex-pack: center;
    130           justify-content: center;
    131   left: 0;
    132   overflow-y: auto;
    133   position: fixed;
    134   top: 0;
    135   width: 100%;
    136   z-index: 10000;
    137 }
    138 
    139 .gifthunt-form-result__modal-content {
    140   margin: 0 auto;
    141   max-width: 500px;
    142   width: 100%;
    143 }
    144 
    145 .gifthunt-form-result__modal.hidden {
    146   display: none;
    147 }
    148 
    149 .gifthunt-form-result__close-button {
    150   background: none;
    151   border: none;
    152   cursor: pointer;
    153   font-size: 18px;
    154   height: 30px;
    155   position: absolute;
    156   right: 0;
    157   top: 0;
    158   width: 30px;
    159 }
    160 
    161 .gifthunt-form__delete-confirm-modal, .gifthunt-form__test-mail-modal, .gifthunt-form__delete-hunter-confirm-modal, .gifthunt-form__success-email-template-preview-modal {
    162   -webkit-box-align: center;
    163       -ms-flex-align: center;
    164           align-items: center;
    165   background: rgba(0, 0, 0, 0.5);
    166   display: -webkit-box;
    167   display: -ms-flexbox;
    168   display: flex;
    169   height: 100%;
    170   -webkit-box-pack: center;
    171       -ms-flex-pack: center;
    172           justify-content: center;
    173   left: 0;
    174   overflow-y: auto;
    175   position: fixed;
    176   top: 0;
    177   width: 100%;
    178   z-index: 10000;
    179 }
    180 
    181 .gifthunt-form__delete-confirm-modal-content, .gifthunt-form__test-mail-modal-content, .gifthunt-form__delete-hunter-confirm-modal-content, .gifthunt-form__success-email-template-preview-modal-content {
    182   background: #fff;
    183   border-radius: 3px;
    184   -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    185           box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    186   margin: 0 auto;
    187   max-width: 500px;
    188   position: relative;
    189   width: 100%;
    190 }
    191 
    192 .gifthunt-form__delete-confirm-modal-content h3, .gifthunt-form__test-mail-modal-content h3, .gifthunt-form__delete-hunter-confirm-modal-content h3, .gifthunt-form__success-email-template-preview-modal-content h3 {
    193   border-bottom: 1px solid #eee;
    194   margin: 0 0 20px 0;
    195   padding: 20px;
    196 }
    197 
    198 .gifthunt-form__delete-confirm-modal-content p, .gifthunt-form__test-mail-modal-content p, .gifthunt-form__delete-hunter-confirm-modal-content p, .gifthunt-form__success-email-template-preview-modal-content p {
    199   border-bottom: 1px solid #eee;
    200   margin: 0 0 20px 0;
    201   padding: 0 20px 20px;
    202 }
    203 
    204 .gifthunt-form__delete-confirm-modal-content label, .gifthunt-form__delete-confirm-modal-content input, .gifthunt-form__test-mail-modal-content label, .gifthunt-form__test-mail-modal-content input, .gifthunt-form__delete-hunter-confirm-modal-content label, .gifthunt-form__delete-hunter-confirm-modal-content input, .gifthunt-form__success-email-template-preview-modal-content label, .gifthunt-form__success-email-template-preview-modal-content input {
    205   margin: 0 20px;
    206 }
    207 
    208 .gifthunt-form__delete-confirm-modal-content input, .gifthunt-form__test-mail-modal-content input, .gifthunt-form__delete-hunter-confirm-modal-content input, .gifthunt-form__success-email-template-preview-modal-content input {
    209   margin-bottom: 10px;
    210 }
    211 
    212 .gifthunt-form__delete-confirm-modal__close-button, .gifthunt-form__test-mail-modal__close-button, .gifthunt-form__delete-hunter-confirm-modal__close-button, .gifthunt-form__success-email-template-preview-modal__close-button {
    213   background: none;
    214   border: none;
    215   cursor: pointer;
    216   font-size: 18px;
    217   height: 30px;
    218   position: absolute;
    219   right: 0;
    220   top: 0;
    221   width: 30px;
    222 }
    223 
    224 .gifthunt-form__delete-confirm-actions, .gifthunt-form__test-mail-actions {
    225   display: -webkit-box;
    226   display: -ms-flexbox;
    227   display: flex;
    228   -webkit-box-pack: justify;
    229       -ms-flex-pack: justify;
    230           justify-content: space-between;
    231   padding: 0 20px 20px;
    232 }
    233 
    234 .gifthunt-form__delete-confirm-modal.hidden, .gifthunt-form__test-mail-modal.hidden, .gifthunt-form__delete-hunter-confirm-modal.hidden, .gifthunt-form__success-email-template-preview-modal.hidden {
    235   display: none;
    236 }
    237 
    238 .gifthunt-form__popup-design-preview-modal {
    239   -webkit-box-align: center;
    240       -ms-flex-align: center;
    241           align-items: center;
    242   background: rgba(0, 0, 0, 0.8);
    243   display: -webkit-box;
    244   display: -ms-flexbox;
    245   display: flex;
    246   height: 100%;
    247   -webkit-box-pack: center;
    248       -ms-flex-pack: center;
    249           justify-content: center;
    250   left: 0;
    251   overflow-y: scroll;
    252   position: fixed;
    253   top: 0;
    254   width: 100%;
    255   z-index: 99999;
    256 }
    257 
    258 .gifthunt-form__popup-design-preview-modal img {
    259   border-radius: 3px;
    260   -webkit-box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.8);
    261           box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.8);
    262   cursor: pointer;
    263 }
    264 
    265 .gifthunt-form__popup-design-preview-modal.hidden {
    266   display: none;
    267 }
    268 
    269 .gifthunt-form__success-email-template-preview-modal-body {
    270   border-bottom: 1px solid #eee;
    271   margin-bottom: 15px;
    272   padding: 0 15px 15px;
    273 }
    274 
    275 .gifthunt-form__success-email-template-preview-modal-body img {
    276   width: 100%;
    277 }
    278 
    279 .gifthunt-card {
    280   background: #fff;
    281   border: 1px solid #e5e5e5;
    282   -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    283           box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    284   margin: 10px 0;
    285   padding: 0;
    286 }
    287 
    288 .gifthunt-card__columns {
    289   display: -webkit-box;
    290   display: -ms-flexbox;
    291   display: flex;
    292 }
    293 
    294 .gifthunt-card__column {
    295   -webkit-box-flex: 1;
    296       -ms-flex: 1;
    297           flex: 1;
    298   padding: 0 20px 0 0;
    299 }
    300 
    301 .gifthunt-card__column:last-child {
    302   padding-right: 0;
    303 }
    304 
    305 .gifthunt-card__title {
    306   margin: 0;
    307   padding: 0;
    308 }
    309 
    310 .gifthunt-card__section {
    311   border-bottom: 1px solid #eee;
    312   padding: 20px;
    313 }
    314 
    315 .gifthunt-card__section--secondary {
    316   background: #f5f5f5;
    317   border-bottom: 1px solid #e3e3e3;
    318 }
    319 
    320 .gifthunt-card__section--closed, .gifthunt-card__section--opened {
    321   padding: 0;
    322 }
    323 
    324 .gifthunt-card__section--closed .gifthunt-form-group__label, .gifthunt-card__section--opened .gifthunt-form-group__label {
    325   padding: 10px 0 10px 10px;
    326 }
    327 
    328 .gifthunt-card__section--closed .gifthunt-form-group__label span, .gifthunt-card__section--opened .gifthunt-form-group__label span {
    329   display: inline-block;
    330   margin-right: 10px;
    331 }
    332 
    333 .gifthunt-card__section--closed .gifthunt-form-group__body, .gifthunt-card__section--opened .gifthunt-form-group__body {
    334   padding: 20px;
    335 }
    336 
    337 .gifthunt-card__section--closed .gifthunt-form-group__label {
    338   background: #ebebeb;
    339   border-bottom: 1px solid #eee;
    340 }
    341 
    342 .gifthunt-card__section--closed .gifthunt-form-group__body {
    343   display: none;
    344 }
    345 
    346 .gifthunt-card__section--opened .gifthunt-form-group__label {
    347   background: #f5f5f5;
    348   border-bottom: 1px solid #eee;
    349 }
    350 
    351 .gifthunt-card__section--opened .gifthunt-form-group__label span {
    352   -webkit-transform: rotate(90deg);
    353           transform: rotate(90deg);
    354 }
    355 
    356 .gifthunt-card__section--opened .gifthunt-form-group__body {
    357   display: block;
    358 }
    359 
    360 .gifthunt-card__section:last-child {
    361   border-bottom: none;
    362 }
    363 
    364 .gifthunt-form-group {
    365   display: -webkit-box;
    366   display: -ms-flexbox;
    367   display: flex;
    368   -webkit-box-orient: vertical;
    369   -webkit-box-direction: normal;
    370       -ms-flex-direction: column;
    371           flex-direction: column;
    372   margin: 0 auto 1.5rem;
    373 }
    374 
    375 .gifthunt-form-group__label {
    376   cursor: pointer;
    377   font-size: .9rem;
    378   font-weight: bold;
    379   line-height: 2rem;
    380 }
    381 
    382 .gifthunt-form-group label {
    383   cursor: pointer;
    384   line-height: 2rem;
    385 }
    386 
    387 .gifthunt-form-group input[type="text"], .gifthunt-form-group input[type="email"], .gifthunt-form-group input[type="number"], .gifthunt-form-group input[type="url"] {
    388   height: 2.5rem;
    389   line-height: 2.5rem;
    390 }
    391 
    392 .gifthunt-form-group input::-webkit-input-placeholder {
    393   color: #c2c2c2;
    394   font-style: italic;
    395 }
    396 
    397 .gifthunt-form-group input:-ms-input-placeholder {
    398   color: #c2c2c2;
    399   font-style: italic;
    400 }
    401 
    402 .gifthunt-form-group input::-ms-input-placeholder {
    403   color: #c2c2c2;
    404   font-style: italic;
    405 }
    406 
    407 .gifthunt-form-group input::placeholder {
    408   color: #c2c2c2;
    409   font-style: italic;
    410 }
    411 
    412 .gifthunt-form-group input.gifthunt-field-error {
    413   background-color: #fbeae5;
    414   border-color: #bf0711;
    415 }
    416 
    417 .gifthunt-form-group textarea.gifthunt-field-error {
    418   background-color: #fbeae5;
    419   border-color: #bf0711;
    420 }
    421 
    422 .gifthunt-form-group__help-text {
    423   color: #888;
    424   margin: .5rem 0;
    425   padding: 0;
    426 }
    427 
    428 .gifthunt-form-group__body label {
    429   display: block;
    430 }
    431 
    432 .gifthunt-form-group:last-child {
    433   margin-bottom: 0;
    434 }
    435 
    436 .gifthunt-input-group {
    437   display: -webkit-box;
    438   display: -ms-flexbox;
    439   display: flex;
    440 }
    441 
    442 .gifthunt-input-group input {
    443   -webkit-box-flex: 1;
    444       -ms-flex: 1;
    445           flex: 1;
    446 }
    447 
    448 .gifthunt-input-group button {
    449   height: 2.5rem !important;
    450   line-height: 2.5rem !important;
    451   margin-left: 20px !important;
    452   color: #bf0711 !important;
    453 }
    454 
    455 .gifthunt--hidden {
    456   display: none;
    457 }
    458 
    459 .gifthunt-page-actions {
    460   -webkit-box-align: center;
    461       -ms-flex-align: center;
    462           align-items: center;
    463   border-top: 1px solid #ccc;
    464   display: -webkit-box;
    465   display: -ms-flexbox;
    466   display: flex;
    467   -webkit-box-pack: justify;
    468       -ms-flex-pack: justify;
    469           justify-content: space-between;
    470   margin: 20px 0;
    471   max-width: 900px;
    472   padding: 20px 0;
    473 }
    474 
    475 .gifthunt-page-actions--header {
    476   border-top: none;
    477   -webkit-box-pack: end;
    478       -ms-flex-pack: end;
    479           justify-content: flex-end;
    480   margin: 0;
    481   padding: 10px 0;
    482 }
    483 
    484 .gifthunt-page-actions--header .button {
    485   margin-left: 20px;
    486 }
    487 
    488 .gifthunt-page-actions--header h1 {
    489   width: 100%;
    490 }
    491 
    492 .gifthunt-page-actions--header h1 small {
    493   font-size: 13px;
    494 }
    495 
    496 .gifthunt-button i {
    497   display: -webkit-inline-box;
    498   display: -ms-inline-flexbox;
    499   display: inline-flex;
    500   height: 100%;
    501 }
    502 
    503 .gifthunt-button i svg {
    504   -ms-flex-item-align: center;
    505       -ms-grid-row-align: center;
    506       align-self: center;
    507 }
    508 
    509 .gifthunt-button i.hidden {
    510   display: none;
    511 }
    512 
    513 .gifthunt-button--link {
    514   color: #888;
    515   line-height: 3rem;
    516   text-decoration: none;
    517 }
    518 
    519 .gifthunt-button--danger {
    520   background: #bf0711 !important;
    521   border-color: #bf0711 !important;
    522   color: #fff !important;
    523 }
    524 
    525 .gifthunt-button--danger:hover {
    526   background: #a1030b !important;
    527   border-color: #6d0308 !important;
    528 }
    529 
    530 .gifthunt-button--danger:disabled.button, .gifthunt-button--danger[disabled].button {
    531   background: #a1030b !important;
    532   border-color: #6d0308 !important;
    533   color: #fff !important;
    534   text-shadow: none !important;
    535   opacity: .8;
    536 }
    537 
    538 .gifthunt-error-message {
    539   color: #bf0711;
    540   line-height: 1.5rem;
    541 }
    542 
    543 .gifthunt-accordion {
    544   border: 1px solid #eee;
    545 }
    546 
    547 .gifthunt-accordion__title {
    548   background: #ebebeb;
    549   border-bottom: 1px solid #eee;
    550   color: #555;
    551   cursor: pointer;
    552   font-size: 14px;
    553   font-weight: 700;
    554   line-height: 40px;
    555   margin: 0;
    556   padding: 0 0 0 10px;
    557 }
    558 
    559 .gifthunt-accordion__title span {
    560   display: inline-block;
    561   margin-right: 5px;
    562 }
    563 
    564 .gifthunt-accordion__info {
    565   border-bottom: 1px solid #eee;
    566   color: #888;
    567   margin: -15px -15px 10px;
    568   padding: .5rem 1rem;
    569 }
    570 
    571 .gifthunt-accordion__body {
    572   display: none;
    573   padding: 15px;
    574 }
    575 
    576 .gifthunt-accordion__section--active .gifthunt-accordion__title {
    577   background: #f5f5f5;
    578   cursor: default;
    579   font-weight: 400;
    580 }
    581 
    582 .gifthunt-accordion__section--active .gifthunt-accordion__title span {
    583   -webkit-transform: rotate(90deg);
    584           transform: rotate(90deg);
    585 }
    586 
    587 .gifthunt-accordion__section--active .gifthunt-accordion__body {
    588   display: block;
    589 }
    590 
    591 #gifthunt-send-test-success-email {
    592   max-width: 140px;
    593 }
    594 
    595 #gifthunt-success-email-list {
    596   list-style-type: square;
    597   margin-left: 20px;
    598 }
    599 
    600 #gifthunt-success-email-list li {
    601   margin-bottom: 20px;
    602 }
    603 
    604 #gifthunt-success-email-list li span {
    605   font-family: 'Courier New', Courier, monospace;
    606 }
    607 
    608 #gifthunt__icon-list {
    609   display: -webkit-box;
    610   display: -ms-flexbox;
    611   display: flex;
    612   -ms-flex-wrap: wrap;
    613       flex-wrap: wrap;
    614 }
    615 
    616 #gifthunt__icon-list label {
    617   -webkit-box-align: center;
    618       -ms-flex-align: center;
    619           align-items: center;
    620   display: -webkit-box;
    621   display: -ms-flexbox;
    622   display: flex;
    623   -webkit-box-orient: vertical;
    624   -webkit-box-direction: normal;
    625       -ms-flex-direction: column;
    626           flex-direction: column;
    627   margin: 10px 10px 10px 0;
    628 }
    629 
    630 #gifthunt__icon-list label .gifthunt-icon-preview {
    631   border: 2px solid #eee;
    632   border-radius: 3px;
    633   display: block;
    634   height: 70px;
    635   margin: 10px auto;
    636   width: 70px;
    637 }
    638 
    639 #gifthunt__icon-list label .gifthunt-icon-preview img {
    640   max-width: 70px;
    641   width: 100%;
    642 }
    643 
    644 #gifthunt__icon-list label .gifthunt-icon-preview:hover {
    645   border: 2px solid #ccc;
    646 }
    647 
    648 #gifthunt__icon-list label input[type="radio"]:checked + .gifthunt-icon-preview {
    649   border: 2px solid #007cb2;
    650 }
    651 
    652 #gifthunt__icon-upload-preview label {
    653   display: none;
    654 }
    655 
    656 #gifthunt__icon-upload-preview img {
    657   max-width: 70px;
    658 }
    659 
    660 #gifthunt__icon-upload-preview input[type="radio"]:checked + .gifthunt-icon-preview {
    661   border: 2px solid #007cb2;
    662 }
    663 
    664 #gifthunt__icon-upload .gifthunt__icon-upload-button-column {
    665   text-align: right;
    666 }
    667 
    668 #gifthunt__icon-animation-list {
    669   display: -webkit-box;
    670   display: -ms-flexbox;
    671   display: flex;
    672   -ms-flex-wrap: wrap;
    673       flex-wrap: wrap;
    674 }
    675 
    676 #gifthunt__icon-animation-list label {
    677   -webkit-box-align: center;
    678       -ms-flex-align: center;
    679           align-items: center;
    680   display: -webkit-box;
    681   display: -ms-flexbox;
    682   display: flex;
    683   -webkit-box-orient: vertical;
    684   -webkit-box-direction: normal;
    685       -ms-flex-direction: column;
    686           flex-direction: column;
    687   margin: 10px 10px 10px 0;
    688 }
    689 
    690 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview {
    691   border: 2px solid #eee;
    692   border-radius: 3px;
    693   display: block;
    694   height: 70px;
    695   margin: 10px auto;
    696   position: relative;
    697   width: 70px;
    698 }
    699 
    700 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview:hover {
    701   border: 2px solid #ccc;
    702 }
    703 
    704 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview span {
    705   background: #ddd;
    706   border-radius: 30px;
    707   display: block;
    708   height: 30px;
    709   margin: 20px auto;
    710   width: 30px;
    711 }
    712 
    713 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .pop {
    714   -webkit-animation-duration: 3s;
    715           animation-duration: 3s;
    716   -webkit-animation-iteration-count: infinite;
    717           animation-iteration-count: infinite;
    718   -webkit-animation-name: pop;
    719           animation-name: pop;
    720 }
    721 
    722 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .bounce {
    723   -webkit-animation-duration: 3s;
    724           animation-duration: 3s;
    725   -webkit-animation-iteration-count: infinite;
    726           animation-iteration-count: infinite;
    727   -webkit-animation-name: bounce;
    728           animation-name: bounce;
    729 }
    730 
    731 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .shake {
    732   -webkit-animation-duration: 3s;
    733           animation-duration: 3s;
    734   -webkit-animation-iteration-count: infinite;
    735           animation-iteration-count: infinite;
    736   -webkit-animation-name: shake;
    737           animation-name: shake;
    738 }
    739 
    740 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .fade_left {
    741   -webkit-animation-duration: 3s;
    742           animation-duration: 3s;
    743   -webkit-animation-iteration-count: infinite;
    744           animation-iteration-count: infinite;
    745   -webkit-animation-name: fade_left;
    746           animation-name: fade_left;
    747 }
    748 
    749 #gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .fade_right {
    750   -webkit-animation-duration: 3s;
    751           animation-duration: 3s;
    752   -webkit-animation-iteration-count: infinite;
    753           animation-iteration-count: infinite;
    754   -webkit-animation-name: fade_right;
    755           animation-name: fade_right;
    756 }
    757 
    758 #gifthunt__icon-animation-list label input[type="radio"]:checked + .gifthunt-icon-animation-preview {
    759   border: 2px solid #007cb2;
    760 }
    761 
    762 #gifthunt__icon-animation-list label input[type="radio"]:checked + .gifthunt-icon-animation-preview span {
    763   background: #555;
    764 }
    765 
    766 #gifthunt__popup-design-list {
    767   display: -webkit-box;
    768   display: -ms-flexbox;
    769   display: flex;
    770   -ms-flex-wrap: wrap;
    771       flex-wrap: wrap;
    772 }
    773 
    774 #gifthunt__popup-design-list label {
    775   -webkit-box-align: center;
    776       -ms-flex-align: center;
    777           align-items: center;
    778   display: -webkit-box;
    779   display: -ms-flexbox;
    780   display: flex;
    781   -webkit-box-orient: vertical;
    782   -webkit-box-direction: normal;
    783       -ms-flex-direction: column;
    784           flex-direction: column;
    785   margin: 10px 10px 10px 0;
    786 }
    787 
    788 #gifthunt__popup-design-list label .gifthunt-popup-design-preview {
    789   border: 2px solid #eee;
    790   border-radius: 3px;
    791   display: block;
    792   height: 120px;
    793   margin: 10px auto;
    794   padding: 5px;
    795   position: relative;
    796   width: 80px;
    797 }
    798 
    799 #gifthunt__popup-design-list label .gifthunt-popup-design-preview:hover {
    800   border: 2px solid #ccc;
    801 }
    802 
    803 #gifthunt__popup-design-list label .gifthunt-popup-design-preview img {
    804   width: 100%;
    805 }
    806 
    807 #gifthunt__popup-design-list label input[type="radio"]:checked + .gifthunt-popup-design-preview {
    808   border: 2px solid #007cb2;
    809 }
    810 
    811 #gifthunt__popup-design-list label input[type="radio"]:checked + .gifthunt-popup-design-preview span {
    812   background: #555;
    813 }
    814 
    815 #gifthunt__success-email-template-list {
    816   display: -webkit-box;
    817   display: -ms-flexbox;
    818   display: flex;
    819   -ms-flex-wrap: wrap;
    820       flex-wrap: wrap;
    821 }
    822 
    823 #gifthunt__success-email-template-list label {
    824   -webkit-box-align: center;
    825       -ms-flex-align: center;
    826           align-items: center;
    827   display: -webkit-box;
    828   display: -ms-flexbox;
    829   display: flex;
    830   -webkit-box-orient: vertical;
    831   -webkit-box-direction: normal;
    832       -ms-flex-direction: column;
    833           flex-direction: column;
    834   margin: 10px 10px 10px 0;
    835 }
    836 
    837 #gifthunt__success-email-template-list label .gifthunt-success-email-template-preview {
    838   border: 2px solid #eee;
    839   border-radius: 3px;
    840   display: block;
    841   height: 55px;
    842   margin: 10px auto;
    843   padding: 5px;
    844   position: relative;
    845   width: 80px;
    846 }
    847 
    848 #gifthunt__success-email-template-list label .gifthunt-success-email-template-preview:hover {
    849   border: 2px solid #ccc;
    850 }
    851 
    852 #gifthunt__success-email-template-list label .gifthunt-success-email-template-preview img {
    853   width: 100%;
    854 }
    855 
    856 #gifthunt__success-email-template-list label input[type="radio"]:checked + .gifthunt-popup-design-preview {
    857   border: 2px solid #007cb2;
    858 }
    859 
    860 #gifthunt__success-email-template-list label input[type="radio"]:checked + .gifthunt-popup-design-preview span {
    861   background: #555;
    862 }
    863 
    864 @-webkit-keyframes pop {
    865   0% {
    866     -webkit-transform: scale(0, 0);
    867             transform: scale(0, 0);
    868   }
    869   10% {
    870     -webkit-transform: scale(1.5, 1.5);
    871             transform: scale(1.5, 1.5);
    872   }
    873   15% {
    874     -webkit-transform: scale(0.5, 0.5);
    875             transform: scale(0.5, 0.5);
    876   }
    877   20% {
    878     -webkit-transform: scale(1.2, 1.2);
    879             transform: scale(1.2, 1.2);
    880   }
    881   25% {
    882     -webkit-transform: scale(0.8, 0.8);
    883             transform: scale(0.8, 0.8);
    884   }
    885   30% {
    886     -webkit-transform: scale(1, 1);
    887             transform: scale(1, 1);
    888   }
    889   89% {
    890     -webkit-transform: scale(1, 1);
    891             transform: scale(1, 1);
    892   }
    893   90% {
    894     -webkit-transform: scale(1.2, 1.2);
    895             transform: scale(1.2, 1.2);
    896   }
    897   100% {
    898     -webkit-transform: scale(1, 1);
    899             transform: scale(1, 1);
    900   }
    901 }
    902 
    903 @keyframes pop {
    904   0% {
    905     -webkit-transform: scale(0, 0);
    906             transform: scale(0, 0);
    907   }
    908   10% {
    909     -webkit-transform: scale(1.5, 1.5);
    910             transform: scale(1.5, 1.5);
    911   }
    912   15% {
    913     -webkit-transform: scale(0.5, 0.5);
    914             transform: scale(0.5, 0.5);
    915   }
    916   20% {
    917     -webkit-transform: scale(1.2, 1.2);
    918             transform: scale(1.2, 1.2);
    919   }
    920   25% {
    921     -webkit-transform: scale(0.8, 0.8);
    922             transform: scale(0.8, 0.8);
    923   }
    924   30% {
    925     -webkit-transform: scale(1, 1);
    926             transform: scale(1, 1);
    927   }
    928   89% {
    929     -webkit-transform: scale(1, 1);
    930             transform: scale(1, 1);
    931   }
    932   90% {
    933     -webkit-transform: scale(1.2, 1.2);
    934             transform: scale(1.2, 1.2);
    935   }
    936   100% {
    937     -webkit-transform: scale(1, 1);
    938             transform: scale(1, 1);
    939   }
    940 }
    941 
    942 @-webkit-keyframes bounce {
    943   0% {
    944     margin-top: 20px;
    945   }
    946   5% {
    947     margin-top: 0px;
    948   }
    949   10% {
    950     margin-top: 20px;
    951   }
    952   15% {
    953     margin-top: 5px;
    954   }
    955   20% {
    956     margin-top: 20px;
    957   }
    958   25% {
    959     margin-top: 10px;
    960   }
    961   30% {
    962     margin-top: 20px;
    963   }
    964   35% {
    965     margin-top: 15px;
    966   }
    967   40% {
    968     margin-top: 20px;
    969   }
    970 }
    971 
    972 @keyframes bounce {
    973   0% {
    974     margin-top: 20px;
    975   }
    976   5% {
    977     margin-top: 0px;
    978   }
    979   10% {
    980     margin-top: 20px;
    981   }
    982   15% {
    983     margin-top: 5px;
    984   }
    985   20% {
    986     margin-top: 20px;
    987   }
    988   25% {
    989     margin-top: 10px;
    990   }
    991   30% {
    992     margin-top: 20px;
    993   }
    994   35% {
    995     margin-top: 15px;
    996   }
    997   40% {
    998     margin-top: 20px;
    999   }
    1000 }
    1001 
    1002 @-webkit-keyframes shake {
    1003   0% {
    1004     margin-left: 20px;
    1005   }
    1006   5% {
    1007     margin-left: 5px;
    1008   }
    1009   10% {
    1010     margin-left: 35px;
    1011   }
    1012   15% {
    1013     margin-left: 10px;
    1014   }
    1015   20% {
    1016     margin-left: 30px;
    1017   }
    1018   25% {
    1019     margin-left: 15px;
    1020   }
    1021   30% {
    1022     margin-left: 25px;
    1023   }
    1024   35% {
    1025     margin-left: 20px;
    1026   }
    1027 }
    1028 
    1029 @keyframes shake {
    1030   0% {
    1031     margin-left: 20px;
    1032   }
    1033   5% {
    1034     margin-left: 5px;
    1035   }
    1036   10% {
    1037     margin-left: 35px;
    1038   }
    1039   15% {
    1040     margin-left: 10px;
    1041   }
    1042   20% {
    1043     margin-left: 30px;
    1044   }
    1045   25% {
    1046     margin-left: 15px;
    1047   }
    1048   30% {
    1049     margin-left: 25px;
    1050   }
    1051   35% {
    1052     margin-left: 20px;
    1053   }
    1054 }
    1055 
    1056 @-webkit-keyframes fade_left {
    1057   0% {
    1058     margin-left: 0;
    1059     opacity: 0;
    1060   }
    1061   30% {
    1062     margin-left: 25px;
    1063     opacity: 1;
    1064   }
    1065   35% {
    1066     margin-left: 20px;
    1067   }
    1068 }
    1069 
    1070 @keyframes fade_left {
    1071   0% {
    1072     margin-left: 0;
    1073     opacity: 0;
    1074   }
    1075   30% {
    1076     margin-left: 25px;
    1077     opacity: 1;
    1078   }
    1079   35% {
    1080     margin-left: 20px;
    1081   }
    1082 }
    1083 
    1084 @-webkit-keyframes fade_right {
    1085   0% {
    1086     margin-left: 40px;
    1087     opacity: 0;
    1088   }
    1089   30% {
    1090     margin-left: 15px;
    1091     opacity: 1;
    1092   }
    1093   35% {
    1094     margin-left: 20px;
    1095   }
    1096 }
    1097 
    1098 @keyframes fade_right {
    1099   0% {
    1100     margin-left: 40px;
    1101     opacity: 0;
    1102   }
    1103   30% {
    1104     margin-left: 15px;
    1105     opacity: 1;
    1106   }
    1107   35% {
    1108     margin-left: 20px;
    1109   }
    1110 }
    1111 
    1112 @media only screen and (max-width: 600px) {
    1113   .gifthunt-card__columns {
    1114     -webkit-box-orient: vertical;
    1115     -webkit-box-direction: normal;
    1116         -ms-flex-direction: column;
    1117             flex-direction: column;
    1118   }
    1119   .gifthunt-card__column {
    1120     padding: 0;
    1121   }
    1122 }
    1123 
    1124 .gifthunt-spin {
    1125   -webkit-animation: gifthunt_spin_animation 1s linear infinite;
    1126           animation: gifthunt_spin_animation 1s linear infinite;
    1127 }
    1128 
    1129 @-webkit-keyframes gifthunt_spin_animation {
    1130   100% {
    1131     -webkit-transform: rotate(360deg);
    1132     transform: rotate(360deg);
    1133   }
    1134 }
    1135 
    1136 @keyframes gifthunt_spin_animation {
    1137   100% {
    1138     -webkit-transform: rotate(360deg);
    1139     transform: rotate(360deg);
    1140   }
    1141 }
    1142 
    1143 .gifthunt-hunters-list .gifthunt-page-actions {
    1144   max-width: 100%;
    1145 }
    1146 
    1147 .gifthunt-hunters-list .gifthunt-page-actions--secondary {
    1148   -webkit-box-align: center;
    1149       -ms-flex-align: center;
    1150           align-items: center;
    1151   display: -webkit-box;
    1152   display: -ms-flexbox;
    1153   display: flex;
    1154 }
    1155 
    1156 .gifthunt-hunters-list .gifthunt-page-actions--secondary .button {
    1157   margin-left: 20px;
    1158 }
    1159 
    1160 .gifthunt-hunters-list .gifthunt-page-actions--header {
    1161   padding-bottom: 0;
    1162 }
    1163 
    1164 .gifthunt-hunters-list .button-delete-hunter {
    1165   font-weight: bold;
    1166 }
    1167 
    1168 .gifthunt-hunters-list .subsubsub {
    1169   margin: 0 0 10px;
    1170 }
    1171 
    1172 .gifthunt-hunters-list__empty-state {
    1173   clear: both;
    1174   color: #888;
    1175   display: block;
    1176   font-size: 16px;
    1177   font-style: italic;
    1178   padding: 10px 0;
    1179   text-align: center;
    1180 }
    1181 
    1182 .info--premium {
    1183   background: #fff5de;
    1184   padding: 10px;
    1185   border-radius: 3px;
    1186   border: 1px solid #e8b646;
    1187   text-decoration: none;
    1188   color: #555;
    1189 }
    1190 
    1191 .info--premium a {
    1192   color: #9f700b;
    1193   font-weight: bold;
    1194 }
    1195 
    1196 /**
    1197  * Fixed header CSS from default wp css
    1198  */
    1199 @media (min-width: 782px) {
    1200   body.js.is-fullscreen-mode .edit-post-header {
    1201     -webkit-transform: translateY(-100%);
    1202             transform: translateY(-100%);
    1203     -webkit-animation: edit-post-fullscreen-mode__slide-in-animation 0.1s forwards;
    1204             animation: edit-post-fullscreen-mode__slide-in-animation 0.1s forwards;
    1205   }
    1206 }
    1207 
    1208 @media (min-width: 782px) and (prefers-reduced-motion: reduce) {
    1209   body.js.is-fullscreen-mode .edit-post-header {
    1210     -webkit-animation-duration: 1ms !important;
    1211             animation-duration: 1ms !important;
    1212   }
    1213 }
    1214 
    1215 @-webkit-keyframes edit-post-fullscreen-mode__slide-in-animation {
    1216   100% {
    1217     -webkit-transform: translateY(0%);
    1218             transform: translateY(0%);
    1219   }
    1220 }
    1221 
    1222 @keyframes edit-post-fullscreen-mode__slide-in-animation {
    1223   100% {
    1224     -webkit-transform: translateY(0%);
    1225             transform: translateY(0%);
    1226   }
    1227 }
    1228 
    1229 .edit-post-header {
    1230   height: 50px;
    1231   padding: 0;
    1232   background: #f1f1f1;
    1233   display: -webkit-box;
    1234   display: -ms-flexbox;
    1235   display: flex;
    1236   z-index: 1100;
    1237   left: 0;
    1238   right: 0;
    1239   top: 0;
    1240   position: -webkit-sticky;
    1241   position: sticky;
    1242 }
    1243 
    1244 @media (min-width: 600px) {
    1245   .edit-post-header {
    1246     position: fixed;
    1247     padding: 5px 20px;
    1248     top: 46px;
    1249   }
    1250 }
    1251 
    1252 @media (min-width: 782px) {
    1253   .edit-post-header {
    1254     top: 32px;
    1255   }
    1256   body.is-fullscreen-mode .edit-post-header {
    1257     top: 0;
    1258   }
    1259 }
    1260 
    1261 .edit-post-header .editor-post-switch-to-draft + .editor-post-preview {
    1262   display: none;
    1263 }
    1264 
    1265 @media (min-width: 600px) {
    1266   .edit-post-header .editor-post-switch-to-draft + .editor-post-preview {
    1267     display: -webkit-inline-box;
    1268     display: -ms-inline-flexbox;
    1269     display: inline-flex;
    1270   }
    1271 }
    1272 
    1273 .edit-post-header > .edit-post-header__settings {
    1274   -webkit-box-ordinal-group: 2;
    1275       -ms-flex-order: 1;
    1276           order: 1;
    1277 }
    1278 
    1279 @supports ((position: -webkit-sticky) or (position: sticky)) {
    1280   .edit-post-header > .edit-post-header__settings {
    1281     -webkit-box-ordinal-group: initial;
    1282         -ms-flex-order: initial;
    1283             order: initial;
    1284   }
    1285 }
    1286 
    1287 .edit-post-header {
    1288   /* Set left position when auto-fold is not on the body element. */
    1289   left: 0;
    1290 }
    1291 
    1292 @media (min-width: 782px) {
    1293   .edit-post-header {
    1294     left: 160px;
    1295   }
    1296 }
    1297 
    1298 @media (min-width: 782px) {
    1299   .auto-fold .edit-post-header {
    1300     left: 36px;
    1301   }
    1302 }
    1303 
    1304 @media (min-width: 960px) {
    1305   .auto-fold .edit-post-header {
    1306     left: 160px;
    1307   }
    1308 }
    1309 
    1310 /* Sidebar manually collapsed. */
    1311 .folded .edit-post-header {
    1312   left: 0;
    1313 }
    1314 
    1315 @media (min-width: 782px) {
    1316   .folded .edit-post-header {
    1317     left: 36px;
    1318   }
    1319 }
    1320 
    1321 /* Mobile menu opened. */
    1322 @media (max-width: 782px) {
    1323   .auto-fold .wp-responsive-open .edit-post-header {
    1324     left: 190px;
    1325   }
    1326 }
    1327 
    1328 /* In small screens with responsive menu expanded there is small white space. */
    1329 @media (max-width: 600px) {
    1330   .auto-fold .wp-responsive-open .edit-post-header {
    1331     margin-left: -18px;
    1332   }
    1333 }
    1334 
    1335 body.is-fullscreen-mode .edit-post-header {
    1336   left: 0 !important;
    1337 }
    1338 
    1339 .edit-post-header__settings {
    1340   display: -webkit-inline-box;
    1341   display: -ms-inline-flexbox;
    1342   display: inline-flex;
    1343   -webkit-box-align: center;
    1344       -ms-flex-align: center;
    1345           align-items: center;
    1346 }
    1347 
    1348 .edit-post-header .components-button.is-toggled {
    1349   color: #fff;
    1350   background: #555d66;
    1351   margin: 1px;
    1352   padding: 7px;
    1353 }
    1354 
    1355 .edit-post-header .components-button.is-toggled:hover, .edit-post-header .components-button.is-toggled:focus {
    1356   -webkit-box-shadow: 0 0 0 1px #555d66, inset 0 0 0 1px #fff !important;
    1357           box-shadow: 0 0 0 1px #555d66, inset 0 0 0 1px #fff !important;
    1358   color: #fff !important;
    1359   background: #555d66 !important;
    1360 }
    1361 
    1362 .edit-post-header .components-button.editor-post-save-draft, .edit-post-header .components-button.editor-post-switch-to-draft, .edit-post-header .components-button.editor-post-preview, .edit-post-header .components-button.editor-post-publish-button, .edit-post-header .components-button.editor-post-publish-panel__toggle {
    1363   margin: 2px;
    1364   height: 33px;
    1365   line-height: 32px;
    1366   font-size: 13px;
    1367 }
    1368 
    1369 .edit-post-header .components-button.editor-post-save-draft, .edit-post-header .components-button.editor-post-switch-to-draft {
    1370   padding: 0 5px;
    1371 }
    1372 
    1373 @media (min-width: 600px) {
    1374   .edit-post-header .components-button.editor-post-save-draft, .edit-post-header .components-button.editor-post-switch-to-draft {
    1375     padding: 0 12px;
    1376   }
    1377 }
    1378 
    1379 .edit-post-header .components-button.editor-post-preview, .edit-post-header .components-button.editor-post-publish-button, .edit-post-header .components-button.editor-post-publish-panel__toggle {
    1380   padding: 0 5px 2px;
    1381 }
    1382 
    1383 @media (min-width: 600px) {
    1384   .edit-post-header .components-button.editor-post-preview, .edit-post-header .components-button.editor-post-publish-button, .edit-post-header .components-button.editor-post-publish-panel__toggle {
    1385     padding: 0 12px 2px;
    1386   }
    1387 }
    1388 
    1389 @media (min-width: 782px) {
    1390   .edit-post-header .components-button.editor-post-preview {
    1391     margin: 0 3px 0 12px;
    1392   }
    1393   .edit-post-header .components-button.editor-post-publish-button, .edit-post-header .components-button.editor-post-publish-panel__toggle {
    1394     margin: 0 12px 0 3px;
    1395   }
    1396 }
    1397 
    1398 .edit-post-fullscreen-mode-close__toolbar {
    1399   display: none;
    1400 }
    1401 
    1402 @media (min-width: 782px) {
    1403   .edit-post-fullscreen-mode-close__toolbar {
    1404     display: block;
    1405     border-top: 0;
    1406     border-bottom: 0;
    1407     border-left: 0;
    1408     margin: -9px 10px -9px -10px;
    1409     padding: 9px 10px;
    1410   }
    1411 }
    1412 
    1413 .edit-post-header-toolbar {
    1414   display: -webkit-inline-box;
    1415   display: -ms-inline-flexbox;
    1416   display: inline-flex;
    1417   -webkit-box-align: center;
    1418       -ms-flex-align: center;
    1419           align-items: center;
    1420 }
    1421 
    1422 .edit-post-header-toolbar > .components-button {
    1423   display: none;
    1424 }
    1425 
    1426 @media (min-width: 600px) {
    1427   .edit-post-header-toolbar > .components-button {
    1428     display: -webkit-inline-box;
    1429     display: -ms-inline-flexbox;
    1430     display: inline-flex;
    1431   }
    1432 }
    1433 
    1434 .edit-post-header-toolbar .block-editor-block-navigation,
    1435 .edit-post-header-toolbar .table-of-contents {
    1436   display: none;
    1437 }
    1438 
    1439 @media (min-width: 600px) {
    1440   .edit-post-header-toolbar .block-editor-block-navigation,
    1441   .edit-post-header-toolbar .table-of-contents {
    1442     display: -webkit-box;
    1443     display: -ms-flexbox;
    1444     display: flex;
    1445   }
    1446 }
    1447 
    1448 .edit-post-header-toolbar__block-toolbar {
    1449   position: absolute;
    1450   top: 56px;
    1451   left: 0;
    1452   right: 0;
    1453   background: #fff;
    1454   min-height: 37px;
    1455   border-bottom: 1px solid #e2e4e7;
    1456 }
    1457 
    1458 .edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar .components-toolbar {
    1459   border-top: none;
    1460   border-bottom: none;
    1461 }
    1462 
    1463 .is-sidebar-opened .edit-post-header-toolbar__block-toolbar {
    1464   display: none;
    1465 }
    1466 
    1467 @media (min-width: 782px) {
    1468   .is-sidebar-opened .edit-post-header-toolbar__block-toolbar {
    1469     display: block;
    1470     right: 280px;
    1471   }
    1472 }
    1473 
    1474 @media (min-width: 1080px) {
    1475   .edit-post-header-toolbar__block-toolbar {
    1476     padding-left: 8px;
    1477     position: static;
    1478     left: auto;
    1479     right: auto;
    1480     background: none;
    1481     border-bottom: none;
    1482     min-height: auto;
    1483   }
    1484   .is-sidebar-opened .edit-post-header-toolbar__block-toolbar {
    1485     right: auto;
    1486   }
    1487   .edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar {
    1488     margin: -9px 0;
    1489   }
    1490   .edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar .components-toolbar {
    1491     padding: 10px 4px 9px;
    1492   }
    1493 }
    1494 /*# sourceMappingURL=gifthunt.css.map */
     1.gifthunt-badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1.5;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out}.gifthunt-badge--active{color:#fff;background-color:#28a745}.gifthunt-badge--inactive{color:#212529;background-color:#f8f9fa}.gifthunt-helptext{color:#888;margin:2rem auto;text-align:center}.gifthunt-helptext p{border:1px solid #ddd;border-radius:2rem;display:inline-block;padding:1rem 2rem}.gifthunt-helptext__icon{display:inline-block;height:1rem;margin:0 1rem 0 0;width:1rem}.gifthunt-helptext__icon svg{display:block;fill:#0073aa;margin-top:2px}.gifthunt-external-link-icon{display:inline-block;height:1rem;width:1rem;max-height:100%;max-width:100%;margin:auto}.gifthunt-external-link-icon svg{display:block;fill:#0073aa;margin-top:4px}.gifthunt-form{display:-webkit-box;display:-ms-flexbox;display:flex;margin-top:60px;max-width:900px}.gifthunt-form__form{-webkit-box-flex:2;-ms-flex:2;flex:2}.gifthunt-form__sidebar{-webkit-box-flex:1;-ms-flex:1;flex:1;padding-left:20px}.gifthunt-form-result{margin:10px 0;position:relative}.gifthunt-form-result--error{background-color:#f9e2e2;border-left:3px solid #d94f4f}.gifthunt-form-result--success{background-color:#eff9f1;border-left:3px solid #4ab866}.gifthunt-form-result__content{margin:1em 25px 1em 0;padding:20px 12px}.gifthunt-form-result__content ul{list-style:disc;margin:20px 0 20px 20px}.gifthunt-form-result__content ul li{margin:0 0 15px 10px;padding:0 0 0 5px}.gifthunt-form-result__modal{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:rgba(0,0,0,0.5);display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;left:0;overflow-y:auto;position:fixed;top:0;width:100%;z-index:10000}.gifthunt-form-result__modal-content{margin:0 auto;max-width:500px;width:100%}.gifthunt-form-result__modal.hidden{display:none}.gifthunt-form-result__close-button{background:none;border:none;cursor:pointer;font-size:18px;height:30px;position:absolute;right:0;top:0;width:30px}.gifthunt-form__delete-confirm-modal,.gifthunt-form__test-mail-modal,.gifthunt-form__delete-hunter-confirm-modal,.gifthunt-form__success-email-template-preview-modal{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:rgba(0,0,0,0.5);display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;left:0;overflow-y:auto;position:fixed;top:0;width:100%;z-index:10000}.gifthunt-form__delete-confirm-modal-content,.gifthunt-form__test-mail-modal-content,.gifthunt-form__delete-hunter-confirm-modal-content,.gifthunt-form__success-email-template-preview-modal-content{background:#fff;border-radius:3px;-webkit-box-shadow:0 10px 20px rgba(0,0,0,0.5);box-shadow:0 10px 20px rgba(0,0,0,0.5);margin:0 auto;max-width:500px;position:relative;width:100%}.gifthunt-form__delete-confirm-modal-content h3,.gifthunt-form__test-mail-modal-content h3,.gifthunt-form__delete-hunter-confirm-modal-content h3,.gifthunt-form__success-email-template-preview-modal-content h3{border-bottom:1px solid #eee;margin:0 0 20px 0;padding:20px}.gifthunt-form__delete-confirm-modal-content p,.gifthunt-form__test-mail-modal-content p,.gifthunt-form__delete-hunter-confirm-modal-content p,.gifthunt-form__success-email-template-preview-modal-content p{border-bottom:1px solid #eee;margin:0 0 20px 0;padding:0 20px 20px}.gifthunt-form__delete-confirm-modal-content label,.gifthunt-form__delete-confirm-modal-content input,.gifthunt-form__test-mail-modal-content label,.gifthunt-form__test-mail-modal-content input,.gifthunt-form__delete-hunter-confirm-modal-content label,.gifthunt-form__delete-hunter-confirm-modal-content input,.gifthunt-form__success-email-template-preview-modal-content label,.gifthunt-form__success-email-template-preview-modal-content input{margin:0 20px}.gifthunt-form__delete-confirm-modal-content input,.gifthunt-form__test-mail-modal-content input,.gifthunt-form__delete-hunter-confirm-modal-content input,.gifthunt-form__success-email-template-preview-modal-content input{margin-bottom:10px}.gifthunt-form__delete-confirm-modal__close-button,.gifthunt-form__test-mail-modal__close-button,.gifthunt-form__delete-hunter-confirm-modal__close-button,.gifthunt-form__success-email-template-preview-modal__close-button{background:none;border:none;cursor:pointer;font-size:18px;height:30px;position:absolute;right:0;top:0;width:30px}.gifthunt-form__delete-confirm-actions,.gifthunt-form__test-mail-actions{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0 20px 20px}.gifthunt-form__delete-confirm-modal.hidden,.gifthunt-form__test-mail-modal.hidden,.gifthunt-form__delete-hunter-confirm-modal.hidden,.gifthunt-form__success-email-template-preview-modal.hidden{display:none}.gifthunt-form__popup-design-preview-modal{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:rgba(0,0,0,0.8);display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;left:0;overflow-y:scroll;position:fixed;top:0;width:100%;z-index:99999}.gifthunt-form__popup-design-preview-modal img{border-radius:3px;-webkit-box-shadow:0px 0px 30px rgba(0,0,0,0.8);box-shadow:0px 0px 30px rgba(0,0,0,0.8);cursor:pointer}.gifthunt-form__popup-design-preview-modal.hidden{display:none}.gifthunt-form__success-email-template-preview-modal-body{border-bottom:1px solid #eee;margin-bottom:15px;padding:0 15px 15px}.gifthunt-form__success-email-template-preview-modal-body img{width:100%}.gifthunt-card{background:#fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);box-shadow:0 1px 1px rgba(0,0,0,0.04);margin:10px 0;padding:0}.gifthunt-card__columns{display:-webkit-box;display:-ms-flexbox;display:flex}.gifthunt-card__column{-webkit-box-flex:1;-ms-flex:1;flex:1;padding:0 20px 0 0}.gifthunt-card__column:last-child{padding-right:0}.gifthunt-card__title{margin:0;padding:0}.gifthunt-card__section{border-bottom:1px solid #eee;padding:20px}.gifthunt-card__section--secondary{background:#f5f5f5;border-bottom:1px solid #e3e3e3}.gifthunt-card__section--closed,.gifthunt-card__section--opened{padding:0}.gifthunt-card__section--closed .gifthunt-form-group__label,.gifthunt-card__section--opened .gifthunt-form-group__label{padding:10px 0 10px 10px}.gifthunt-card__section--closed .gifthunt-form-group__label span,.gifthunt-card__section--opened .gifthunt-form-group__label span{display:inline-block;margin-right:10px}.gifthunt-card__section--closed .gifthunt-form-group__body,.gifthunt-card__section--opened .gifthunt-form-group__body{padding:20px}.gifthunt-card__section--closed .gifthunt-form-group__label{background:#ebebeb;border-bottom:1px solid #eee}.gifthunt-card__section--closed .gifthunt-form-group__body{display:none}.gifthunt-card__section--opened .gifthunt-form-group__label{background:#f5f5f5;border-bottom:1px solid #eee}.gifthunt-card__section--opened .gifthunt-form-group__label span{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.gifthunt-card__section--opened .gifthunt-form-group__body{display:block}.gifthunt-card__section:last-child{border-bottom:none}.gifthunt-form-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:0 auto 1.5rem}.gifthunt-form-group__label{cursor:pointer;font-size:.9rem;font-weight:bold;line-height:2rem}.gifthunt-form-group label{cursor:pointer;line-height:2rem}.gifthunt-form-group input[type="text"],.gifthunt-form-group input[type="email"],.gifthunt-form-group input[type="number"],.gifthunt-form-group input[type="url"]{height:2.5rem;line-height:2.5rem}.gifthunt-form-group input::-webkit-input-placeholder{color:#c2c2c2;font-style:italic}.gifthunt-form-group input:-ms-input-placeholder{color:#c2c2c2;font-style:italic}.gifthunt-form-group input::-ms-input-placeholder{color:#c2c2c2;font-style:italic}.gifthunt-form-group input::placeholder{color:#c2c2c2;font-style:italic}.gifthunt-form-group input.gifthunt-field-error{background-color:#fbeae5;border-color:#bf0711}.gifthunt-form-group textarea.gifthunt-field-error{background-color:#fbeae5;border-color:#bf0711}.gifthunt-form-group__help-text{color:#888;margin:.5rem 0;padding:0}.gifthunt-form-group__body label{display:block}.gifthunt-form-group:last-child{margin-bottom:0}.gifthunt-input-group{display:-webkit-box;display:-ms-flexbox;display:flex}.gifthunt-input-group input{-webkit-box-flex:1;-ms-flex:1;flex:1}.gifthunt-input-group button{height:2.5rem !important;line-height:2.5rem !important;margin-left:20px !important;color:#bf0711 !important}.gifthunt--hidden{display:none}.gifthunt-page-actions{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-top:1px solid #ccc;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin:20px 0;max-width:900px;padding:20px 0}.gifthunt-page-actions--header{border-top:none;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;margin:0;padding:10px 0}.gifthunt-page-actions--header .button{margin-left:20px}.gifthunt-page-actions--header h1{width:100%}.gifthunt-page-actions--header h1 small{font-size:13px}.gifthunt-button i{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;height:100%}.gifthunt-button i svg{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.gifthunt-button i.hidden{display:none}.gifthunt-button--link{color:#888;line-height:3rem;text-decoration:none}.gifthunt-button--danger{background:#bf0711 !important;border-color:#bf0711 !important;color:#fff !important}.gifthunt-button--danger:hover{background:#a1030b !important;border-color:#6d0308 !important}.gifthunt-button--danger:disabled.button,.gifthunt-button--danger[disabled].button{background:#a1030b !important;border-color:#6d0308 !important;color:#fff !important;text-shadow:none !important;opacity:.8}.gifthunt-error-message{color:#bf0711;line-height:1.5rem}.gifthunt-accordion{border:1px solid #eee}.gifthunt-accordion__title{background:#ebebeb;border-bottom:1px solid #eee;color:#555;cursor:pointer;font-size:14px;font-weight:700;line-height:40px;margin:0;padding:0 0 0 10px}.gifthunt-accordion__title span{display:inline-block;margin-right:5px}.gifthunt-accordion__info{border-bottom:1px solid #eee;color:#888;margin:-15px -15px 10px;padding:.5rem 1rem}.gifthunt-accordion__body{display:none;padding:15px}.gifthunt-accordion__section--active .gifthunt-accordion__title{background:#f5f5f5;cursor:default;font-weight:400}.gifthunt-accordion__section--active .gifthunt-accordion__title span{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.gifthunt-accordion__section--active .gifthunt-accordion__body{display:block}#gifthunt-send-test-success-email{max-width:140px}#gifthunt-success-email-list{list-style-type:square;margin-left:20px}#gifthunt-success-email-list li{margin-bottom:20px}#gifthunt-success-email-list li span{font-family:'Courier New', Courier, monospace}#gifthunt__icon-list{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}#gifthunt__icon-list label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:10px 10px 10px 0}#gifthunt__icon-list label .gifthunt-icon-preview{border:2px solid #eee;border-radius:3px;display:block;height:70px;margin:10px auto;width:70px}#gifthunt__icon-list label .gifthunt-icon-preview img{max-width:70px;width:100%}#gifthunt__icon-list label .gifthunt-icon-preview:hover{border:2px solid #ccc}#gifthunt__icon-list label input[type="radio"]:checked+.gifthunt-icon-preview{border:2px solid #007cb2}#gifthunt__icon-upload-preview label{display:none}#gifthunt__icon-upload-preview img{max-width:70px}#gifthunt__icon-upload-preview input[type="radio"]:checked+.gifthunt-icon-preview{border:2px solid #007cb2}#gifthunt__icon-upload .gifthunt__icon-upload-button-column{text-align:right}#gifthunt__icon-animation-list{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}#gifthunt__icon-animation-list label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:10px 10px 10px 0}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview{border:2px solid #eee;border-radius:3px;display:block;height:70px;margin:10px auto;position:relative;width:70px}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview:hover{border:2px solid #ccc}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview span{background:#ddd;border-radius:30px;display:block;height:30px;margin:20px auto;width:30px}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .pop{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:pop;animation-name:pop}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .bounce{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:bounce;animation-name:bounce}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .shake{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:shake;animation-name:shake}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .fade_left{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:fade_left;animation-name:fade_left}#gifthunt__icon-animation-list label .gifthunt-icon-animation-preview .fade_right{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:fade_right;animation-name:fade_right}#gifthunt__icon-animation-list label input[type="radio"]:checked+.gifthunt-icon-animation-preview{border:2px solid #007cb2}#gifthunt__icon-animation-list label input[type="radio"]:checked+.gifthunt-icon-animation-preview span{background:#555}#gifthunt__popup-design-list{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}#gifthunt__popup-design-list label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:10px 10px 10px 0}#gifthunt__popup-design-list label .gifthunt-popup-design-preview{border:2px solid #eee;border-radius:3px;display:block;height:120px;margin:10px auto;padding:5px;position:relative;width:80px}#gifthunt__popup-design-list label .gifthunt-popup-design-preview:hover{border:2px solid #ccc}#gifthunt__popup-design-list label .gifthunt-popup-design-preview img{width:100%}#gifthunt__popup-design-list label input[type="radio"]:checked+.gifthunt-popup-design-preview{border:2px solid #007cb2}#gifthunt__popup-design-list label input[type="radio"]:checked+.gifthunt-popup-design-preview span{background:#555}#gifthunt__success-email-template-list{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}#gifthunt__success-email-template-list label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:10px 10px 10px 0}#gifthunt__success-email-template-list label .gifthunt-success-email-template-preview{border:2px solid #eee;border-radius:3px;display:block;height:55px;margin:10px auto;padding:5px;position:relative;width:80px}#gifthunt__success-email-template-list label .gifthunt-success-email-template-preview:hover{border:2px solid #ccc}#gifthunt__success-email-template-list label .gifthunt-success-email-template-preview img{width:100%}#gifthunt__success-email-template-list label input[type="radio"]:checked+.gifthunt-popup-design-preview{border:2px solid #007cb2}#gifthunt__success-email-template-list label input[type="radio"]:checked+.gifthunt-popup-design-preview span{background:#555}@-webkit-keyframes pop{0%{-webkit-transform:scale(0, 0);transform:scale(0, 0)}10%{-webkit-transform:scale(1.5, 1.5);transform:scale(1.5, 1.5)}15%{-webkit-transform:scale(0.5, 0.5);transform:scale(0.5, 0.5)}20%{-webkit-transform:scale(1.2, 1.2);transform:scale(1.2, 1.2)}25%{-webkit-transform:scale(0.8, 0.8);transform:scale(0.8, 0.8)}30%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}89%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}90%{-webkit-transform:scale(1.2, 1.2);transform:scale(1.2, 1.2)}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}}@keyframes pop{0%{-webkit-transform:scale(0, 0);transform:scale(0, 0)}10%{-webkit-transform:scale(1.5, 1.5);transform:scale(1.5, 1.5)}15%{-webkit-transform:scale(0.5, 0.5);transform:scale(0.5, 0.5)}20%{-webkit-transform:scale(1.2, 1.2);transform:scale(1.2, 1.2)}25%{-webkit-transform:scale(0.8, 0.8);transform:scale(0.8, 0.8)}30%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}89%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}90%{-webkit-transform:scale(1.2, 1.2);transform:scale(1.2, 1.2)}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}}@-webkit-keyframes bounce{0%{margin-top:20px}5%{margin-top:0px}10%{margin-top:20px}15%{margin-top:5px}20%{margin-top:20px}25%{margin-top:10px}30%{margin-top:20px}35%{margin-top:15px}40%{margin-top:20px}}@keyframes bounce{0%{margin-top:20px}5%{margin-top:0px}10%{margin-top:20px}15%{margin-top:5px}20%{margin-top:20px}25%{margin-top:10px}30%{margin-top:20px}35%{margin-top:15px}40%{margin-top:20px}}@-webkit-keyframes shake{0%{margin-left:20px}5%{margin-left:5px}10%{margin-left:35px}15%{margin-left:10px}20%{margin-left:30px}25%{margin-left:15px}30%{margin-left:25px}35%{margin-left:20px}}@keyframes shake{0%{margin-left:20px}5%{margin-left:5px}10%{margin-left:35px}15%{margin-left:10px}20%{margin-left:30px}25%{margin-left:15px}30%{margin-left:25px}35%{margin-left:20px}}@-webkit-keyframes fade_left{0%{margin-left:0;opacity:0}30%{margin-left:25px;opacity:1}35%{margin-left:20px}}@keyframes fade_left{0%{margin-left:0;opacity:0}30%{margin-left:25px;opacity:1}35%{margin-left:20px}}@-webkit-keyframes fade_right{0%{margin-left:40px;opacity:0}30%{margin-left:15px;opacity:1}35%{margin-left:20px}}@keyframes fade_right{0%{margin-left:40px;opacity:0}30%{margin-left:15px;opacity:1}35%{margin-left:20px}}@media only screen and (max-width: 600px){.gifthunt-card__columns{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.gifthunt-card__column{padding:0}}.gifthunt-spin{-webkit-animation:gifthunt_spin_animation 1s linear infinite;animation:gifthunt_spin_animation 1s linear infinite}@-webkit-keyframes gifthunt_spin_animation{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes gifthunt_spin_animation{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.gifthunt-hunters-list .gifthunt-page-actions{max-width:100%}.gifthunt-hunters-list .gifthunt-page-actions--secondary{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.gifthunt-hunters-list .gifthunt-page-actions--secondary .button{margin-left:20px}.gifthunt-hunters-list .gifthunt-page-actions--header{padding-bottom:0}.gifthunt-hunters-list .button-delete-hunter{font-weight:bold}.gifthunt-hunters-list .subsubsub{margin:0 0 10px}.gifthunt-hunters-list__empty-state{clear:both;color:#888;display:block;font-size:16px;font-style:italic;padding:10px 0;text-align:center}.info--premium{background:#fff5de;padding:10px;border-radius:3px;border:1px solid #e8b646;text-decoration:none;color:#555}.info--premium a{color:#9f700b;font-weight:bold}@media (min-width: 782px){body.js.is-fullscreen-mode .edit-post-header{-webkit-transform:translateY(-100%);transform:translateY(-100%);-webkit-animation:edit-post-fullscreen-mode__slide-in-animation 0.1s forwards;animation:edit-post-fullscreen-mode__slide-in-animation 0.1s forwards}}@media (min-width: 782px) and (prefers-reduced-motion: reduce){body.js.is-fullscreen-mode .edit-post-header{-webkit-animation-duration:1ms !important;animation-duration:1ms !important}}@-webkit-keyframes edit-post-fullscreen-mode__slide-in-animation{100%{-webkit-transform:translateY(0%);transform:translateY(0%)}}@keyframes edit-post-fullscreen-mode__slide-in-animation{100%{-webkit-transform:translateY(0%);transform:translateY(0%)}}.edit-post-header{height:50px;padding:0;background:#f1f1f1;display:-webkit-box;display:-ms-flexbox;display:flex;z-index:1100;left:0;right:0;top:0;position:-webkit-sticky;position:sticky}@media (min-width: 600px){.edit-post-header{position:fixed;padding:5px 20px;top:46px}}@media (min-width: 782px){.edit-post-header{top:32px}body.is-fullscreen-mode .edit-post-header{top:0}}.edit-post-header .editor-post-switch-to-draft+.editor-post-preview{display:none}@media (min-width: 600px){.edit-post-header .editor-post-switch-to-draft+.editor-post-preview{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}}.edit-post-header>.edit-post-header__settings{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}@supports ((position: -webkit-sticky) or (position: sticky)){.edit-post-header>.edit-post-header__settings{-webkit-box-ordinal-group:initial;-ms-flex-order:initial;order:initial}}.edit-post-header{left:0}@media (min-width: 782px){.edit-post-header{left:160px}}@media (min-width: 782px){.auto-fold .edit-post-header{left:36px}}@media (min-width: 960px){.auto-fold .edit-post-header{left:160px}}.folded .edit-post-header{left:0}@media (min-width: 782px){.folded .edit-post-header{left:36px}}@media (max-width: 782px){.auto-fold .wp-responsive-open .edit-post-header{left:190px}}@media (max-width: 600px){.auto-fold .wp-responsive-open .edit-post-header{margin-left:-18px}}body.is-fullscreen-mode .edit-post-header{left:0 !important}.edit-post-header__settings{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.edit-post-header .components-button.is-toggled{color:#fff;background:#555d66;margin:1px;padding:7px}.edit-post-header .components-button.is-toggled:hover,.edit-post-header .components-button.is-toggled:focus{-webkit-box-shadow:0 0 0 1px #555d66, inset 0 0 0 1px #fff !important;box-shadow:0 0 0 1px #555d66, inset 0 0 0 1px #fff !important;color:#fff !important;background:#555d66 !important}.edit-post-header .components-button.editor-post-save-draft,.edit-post-header .components-button.editor-post-switch-to-draft,.edit-post-header .components-button.editor-post-preview,.edit-post-header .components-button.editor-post-publish-button,.edit-post-header .components-button.editor-post-publish-panel__toggle{margin:2px;height:33px;line-height:32px;font-size:13px}.edit-post-header .components-button.editor-post-save-draft,.edit-post-header .components-button.editor-post-switch-to-draft{padding:0 5px}@media (min-width: 600px){.edit-post-header .components-button.editor-post-save-draft,.edit-post-header .components-button.editor-post-switch-to-draft{padding:0 12px}}.edit-post-header .components-button.editor-post-preview,.edit-post-header .components-button.editor-post-publish-button,.edit-post-header .components-button.editor-post-publish-panel__toggle{padding:0 5px 2px}@media (min-width: 600px){.edit-post-header .components-button.editor-post-preview,.edit-post-header .components-button.editor-post-publish-button,.edit-post-header .components-button.editor-post-publish-panel__toggle{padding:0 12px 2px}}@media (min-width: 782px){.edit-post-header .components-button.editor-post-preview{margin:0 3px 0 12px}.edit-post-header .components-button.editor-post-publish-button,.edit-post-header .components-button.editor-post-publish-panel__toggle{margin:0 12px 0 3px}}.edit-post-fullscreen-mode-close__toolbar{display:none}@media (min-width: 782px){.edit-post-fullscreen-mode-close__toolbar{display:block;border-top:0;border-bottom:0;border-left:0;margin:-9px 10px -9px -10px;padding:9px 10px}}.edit-post-header-toolbar{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.edit-post-header-toolbar>.components-button{display:none}@media (min-width: 600px){.edit-post-header-toolbar>.components-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}}.edit-post-header-toolbar .block-editor-block-navigation,.edit-post-header-toolbar .table-of-contents{display:none}@media (min-width: 600px){.edit-post-header-toolbar .block-editor-block-navigation,.edit-post-header-toolbar .table-of-contents{display:-webkit-box;display:-ms-flexbox;display:flex}}.edit-post-header-toolbar__block-toolbar{position:absolute;top:56px;left:0;right:0;background:#fff;min-height:37px;border-bottom:1px solid #e2e4e7}.edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar .components-toolbar{border-top:none;border-bottom:none}.is-sidebar-opened .edit-post-header-toolbar__block-toolbar{display:none}@media (min-width: 782px){.is-sidebar-opened .edit-post-header-toolbar__block-toolbar{display:block;right:280px}}@media (min-width: 1080px){.edit-post-header-toolbar__block-toolbar{padding-left:8px;position:static;left:auto;right:auto;background:none;border-bottom:none;min-height:auto}.is-sidebar-opened .edit-post-header-toolbar__block-toolbar{right:auto}.edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar{margin:-9px 0}.edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar .components-toolbar{padding:10px 4px 9px}}
  • gift-hunt/tags/1.0.3/assets/scripts/gifthunt.js

    r2280169 r2409806  
    22 * Datepickers - visible from and to fields
    33 */
    4 jQuery(document).ready(function(){
    5   jQuery('#visible_from').datepicker({
    6     dateFormat : 'yy-mm-dd',
    7     minDate: 0
    8   });
    9 
    10   jQuery('#visible_to').datepicker({
    11     dateFormat : 'yy-mm-dd',
    12     minDate: 0
    13   });
     4jQuery(document).ready(function () {
     5    jQuery("#visible_from").datepicker({
     6        dateFormat: "yy-mm-dd",
     7        minDate: 0,
     8    });
     9
     10    jQuery("#visible_to").datepicker({
     11        dateFormat: "yy-mm-dd",
     12        minDate: 0,
     13    });
    1414});
    1515
     
    1717 * Show - hide elements on value change
    1818 */
    19 document.querySelectorAll("input[name='display_type']").forEach(displayTypeRadio => {
    20   displayTypeRadio.addEventListener("change", toggleDisplayTypeFields);
    21 });
    22 
    23 function toggleDisplayTypeFields(){
    24   if(this.value == "time"){
    25     // hide pageview section
    26     document.querySelector("#pageview_to_display_section").classList.add("hidden");
    27     // display time section
    28     document.querySelector("#time_to_display_section").classList.remove("hidden");
    29   } else {
    30     // hide time section
    31     document.querySelector("#time_to_display_section").classList.add("hidden");
    32     // display pageview section
    33     document.querySelector("#pageview_to_display_section").classList.remove("hidden");
    34   }
     19document.querySelectorAll("input[name='display_type']").forEach((displayTypeRadio) => {
     20    displayTypeRadio.addEventListener("change", toggleDisplayTypeFields);
     21});
     22
     23function toggleDisplayTypeFields() {
     24    if (this.value == "time") {
     25        // hide pageview section
     26        document.querySelector("#pageview_to_display_section").classList.add("hidden");
     27        // display time section
     28        document.querySelector("#time_to_display_section").classList.remove("hidden");
     29    } else {
     30        // hide time section
     31        document.querySelector("#time_to_display_section").classList.add("hidden");
     32        // display pageview section
     33        document.querySelector("#pageview_to_display_section").classList.remove("hidden");
     34    }
    3535}
    3636
    3737document.querySelector("#form_collect_first_name").addEventListener("change", (e) => {
    38   if(e.target.checked){
    39     // display first name label field
    40     document.querySelector("#form_label_first_name_section").classList.remove("hidden");
    41   } else {
    42     // hide first name label field
    43     document.querySelector("#form_label_first_name_section").classList.add("hidden");
    44   }
     38    if (e.target.checked) {
     39        // display first name label field
     40        document.querySelector("#form_label_first_name_section").classList.remove("hidden");
     41    } else {
     42        // hide first name label field
     43        document.querySelector("#form_label_first_name_section").classList.add("hidden");
     44    }
    4545});
    4646
    4747document.querySelector("#form_collect_last_name").addEventListener("change", (e) => {
    48   if(e.target.checked){
    49     // display last name label field
    50     document.querySelector("#form_label_last_name_section").classList.remove("hidden");
    51   } else {
    52     // hide last name label field
    53     document.querySelector("#form_label_last_name_section").classList.add("hidden");
    54   }
     48    if (e.target.checked) {
     49        // display last name label field
     50        document.querySelector("#form_label_last_name_section").classList.remove("hidden");
     51    } else {
     52        // hide last name label field
     53        document.querySelector("#form_label_last_name_section").classList.add("hidden");
     54    }
    5555});
    5656
    5757document.querySelector("#form_collect_additional_information").addEventListener("change", (e) => {
    58   if(e.target.checked){
    59     // display additional information label field
    60     document.querySelector("#form_label_additional_information_section").classList.remove("hidden");
    61   } else {
    62     // hide additional information label field
    63     document.querySelector("#form_label_additional_information_section").classList.add("hidden");
    64   }
    65 });
    66 
    67 document.querySelectorAll("input[name='gift_type']").forEach(giftType => {
    68   giftType.addEventListener("change", toggelGiftSections);
    69 });
    70 
    71 function toggelGiftSections(){
    72   if(this.value == "oneMany"){
    73     // hide more gifts section
    74     document.querySelector("#gifthunt-card--more-gifts").classList.add("hidden");
    75     // display one gift section
    76     document.querySelector("#gifthunt-card--one-gift").classList.remove("hidden");
    77   } else {
    78     // hide one gift section
    79     document.querySelector("#gifthunt-card--one-gift").classList.add("hidden");
    80     // display more gifts section
    81     document.querySelector("#gifthunt-card--more-gifts").classList.remove("hidden");
    82   }
     58    if (e.target.checked) {
     59        // display additional information label field
     60        document.querySelector("#form_label_additional_information_section").classList.remove("hidden");
     61    } else {
     62        // hide additional information label field
     63        document.querySelector("#form_label_additional_information_section").classList.add("hidden");
     64    }
     65});
     66
     67document.querySelector("#success_email_send").addEventListener("change", (e) => {
     68    if (e.target.checked) {
     69        // show success email settings sections
     70        document.querySelectorAll(".success-email-section").forEach((section) => {
     71            section.classList.remove("hidden");
     72        });
     73    } else {
     74        // hide success email settings sections
     75        document.querySelectorAll(".success-email-section").forEach((section) => {
     76            section.classList.add("hidden");
     77        });
     78    }
     79});
     80
     81document.querySelectorAll("input[name='gift_type']").forEach((giftType) => {
     82    giftType.addEventListener("change", toggelGiftSections);
     83});
     84
     85function toggelGiftSections() {
     86    if (this.value == "oneMany") {
     87        // hide more gifts section
     88        document.querySelector("#gifthunt-card--more-gifts").classList.add("hidden");
     89        // display one gift section
     90        document.querySelector("#gifthunt-card--one-gift").classList.remove("hidden");
     91    } else {
     92        // hide one gift section
     93        document.querySelector("#gifthunt-card--one-gift").classList.add("hidden");
     94        // display more gifts section
     95        document.querySelector("#gifthunt-card--more-gifts").classList.remove("hidden");
     96    }
    8397}
    8498
    8599document.querySelector("#active").addEventListener("change", (e) => {
    86   if(e.target.checked){
    87     // display date fields
    88     document.querySelector("#visible-from-section").classList.remove("hidden");
    89     document.querySelector("#visible-to-section").classList.remove("hidden");
    90   } else {
    91     // hide date fields
    92     document.querySelector("#visible-from-section").classList.add("hidden");
    93     document.querySelector("#visible-to-section").classList.add("hidden");
    94   }
     100    if (e.target.checked) {
     101        // display date fields
     102        document.querySelector("#visible-from-section").classList.remove("hidden");
     103        document.querySelector("#visible-to-section").classList.remove("hidden");
     104    } else {
     105        // hide date fields
     106        document.querySelector("#visible-from-section").classList.add("hidden");
     107        document.querySelector("#visible-to-section").classList.add("hidden");
     108    }
    95109});
    96110
     
    100114document.querySelector("#gifthunt-add-gift-button").addEventListener("click", addNewGiftField);
    101115
    102 function addNewGiftField(){
    103   // get highest gift index
    104   let giftIndex = 1;
    105   document.querySelectorAll("#gifthunt-card__section--gift-list .gift-item").forEach(giftItem => {
    106     const currentIndex = parseInt(giftItem.dataset.giftId);
    107     if(currentIndex >= giftIndex){
    108       giftIndex = currentIndex + 1;
    109     }
    110   });
    111  
    112   let giftFieldTemplate = document.querySelector("#gift-field-template").textContent.replace(/%GIFTID%/gi, giftIndex).replace(/%GIFTDBID%/gi, "0").replace(/%GIFTGIFT%/gi, "");
    113   let newField = document.createRange().createContextualFragment(giftFieldTemplate);
    114 
    115   document.querySelector("#gifthunt-card__section--gift-list").appendChild(newField);
     116function addNewGiftField() {
     117    // get highest gift index
     118    let giftIndex = 1;
     119    document.querySelectorAll("#gifthunt-card__section--gift-list .gift-item").forEach((giftItem) => {
     120        const currentIndex = parseInt(giftItem.dataset.giftId);
     121        if (currentIndex >= giftIndex) {
     122            giftIndex = currentIndex + 1;
     123        }
     124    });
     125
     126    let giftFieldTemplate = document
     127        .querySelector("#gift-field-template")
     128        .textContent.replace(/%GIFTID%/gi, giftIndex)
     129        .replace(/%GIFTDBID%/gi, "0")
     130        .replace(/%GIFTGIFT%/gi, "");
     131    let newField = document.createRange().createContextualFragment(giftFieldTemplate);
     132
     133    document.querySelector("#gifthunt-card__section--gift-list").appendChild(newField);
    116134}
    117135
     
    120138 */
    121139document.addEventListener("click", (e) => {
    122   if(e.target.classList.contains("gifthunt__gift-item-remove-button")){
    123     document.querySelector(`#gift-item-${e.target.dataset.giftId}`).remove();
    124   }
     140    if (e.target.classList.contains("gifthunt__gift-item-remove-button")) {
     141        document.querySelector(`#gift-item-${e.target.dataset.giftId}`).remove();
     142    }
    125143});
    126144
     
    129147 */
    130148const gifthuntRequiredFields = document.querySelectorAll("form [required]");
    131 gifthuntRequiredFields.forEach(requiredField => {
     149gifthuntRequiredFields.forEach((requiredField) => {
    132150    valueCheck(requiredField);
    133151    requiredField.addEventListener("blur", () => valueCheck(requiredField));
    134152});
    135153
    136 function valueCheck(element){
    137     if(!element.value){
    138     if(element.classList.contains("gifthunt-field-error")){
    139       return;
    140     }
     154function valueCheck(element) {
     155    if (!element.value) {
     156        if (element.classList.contains("gifthunt-field-error")) {
     157            return;
     158        }
    141159
    142160        // display error message
     
    151169    } else {
    152170        // remove error message if exists
    153         if(document.querySelector(`#gifthunt-error-message-${element.id}`)){
     171        if (document.querySelector(`#gifthunt-error-message-${element.id}`)) {
    154172            element.classList.remove("gifthunt-field-error");
    155173            document.querySelector(`#gifthunt-error-message-${element.id}`).remove();
     
    161179 * Display or hide error for empty editors
    162180 */
    163 function toggleEditorError(editorId, action){
    164   if(action == "display"){
    165     // display editor error message
    166     document.querySelector(`#${editorId}-error-message`).classList.remove("hidden");
    167   } else {
    168     // hide editor error message
    169     document.querySelector(`#${editorId}-error-message`).classList.add("hidden");
    170   }
    171 }
    172 
    173 function toggleIconError(action){
    174   if(action == "display"){
    175     document.querySelector("#icon_error-message").classList.remove("hidden");
    176   } else {
    177     document.querySelector("#icon_error-message").classList.add("hidden");
    178   }
    179 }
    180 
    181 function toggleGiftTypeError(action){
    182   if(action == "display"){
    183     document.querySelector("#gift_type-error-message").classList.remove("hidden");
    184   } else {
    185     document.querySelector("#gift_type-error-message").classList.add("hidden");
    186   }
     181function toggleEditorError(editorId, action) {
     182    if (action == "display") {
     183        // display editor error message
     184        document.querySelector(`#${editorId}-error-message`).classList.remove("hidden");
     185    } else {
     186        // hide editor error message
     187        document.querySelector(`#${editorId}-error-message`).classList.add("hidden");
     188    }
     189}
     190
     191function toggleIconError(action) {
     192    if (action == "display") {
     193        document.querySelector("#icon_error-message").classList.remove("hidden");
     194    } else {
     195        document.querySelector("#icon_error-message").classList.add("hidden");
     196    }
     197}
     198
     199function toggleGiftTypeError(action) {
     200    if (action == "display") {
     201        document.querySelector("#gift_type-error-message").classList.remove("hidden");
     202    } else {
     203        document.querySelector("#gift_type-error-message").classList.add("hidden");
     204    }
    187205}
    188206
     
    190208 * Check if the form is ready to save
    191209 */
    192 function checkReadyToSave(){
    193   let gifthuntSessionData = {};
    194   let errorCount = 0;
    195   let errorMessages = [];
    196  
    197   // check basic fields
    198   const requiredBasicFields = ["#name", "#popup_title", "#form_label_email", "#form_label_legal", "#form_legal_url", "#popup_button", "#success_email_sender_name", "#success_email_sender_email", "#success_email_subject"];
    199  
    200   requiredBasicFields.forEach(requiredField => {
    201     const currentField = document.querySelector(requiredField);
    202     if(!currentField.value){
    203       errorCount++;
    204       valueCheck(currentField);
    205       errorMessages.push(currentField.dataset.gifthuntError);
    206     } else {
    207       valueCheck(currentField);
    208     }
    209 
    210     gifthuntSessionData[currentField.id] = currentField.value;
    211   });
    212 
    213   // check wysiwyg fields
    214   const requiredEditorFields = ["popup_body", "popup_submit_body", "success_email_body"];
    215   requiredEditorFields.forEach(requiredField => {
    216     let currentValue = "";
    217     if(tinyMCE.editors[requiredField]){
    218       /**
    219        * Visual editor
    220        */
    221       currentValue = tinyMCE.editors[requiredField].getContent();
    222     } else {
    223       /**
    224        * Text editor
    225        */
    226       currentValue = document.querySelector(`#${requiredField}`).value;
    227     }
    228 
    229     gifthuntSessionData[requiredField] = currentValue;
    230 
    231     if(currentValue.replace(/<[^>]*>?/gm, '') == ""){
    232       errorCount++;
    233       toggleEditorError(requiredField, "display");
    234       errorMessages.push(document.querySelector(`#${requiredField}-error-message`).textContent);
    235     } else {
    236       toggleEditorError(requiredField, "hide");
    237     }
    238   });
    239 
    240   // check session icon
    241   const icon = document.querySelector("input[name='icon']:checked");
    242   const customIcon = document.querySelector("#custom_icon");
    243   if(!icon){
    244     errorCount++;
    245     toggleIconError("display");
    246     errorMessages.push(document.querySelector("#icon_error-message").textContent);
    247   } else {
    248     toggleIconError("hide");
    249     gifthuntSessionData["icon"] = icon.value;
    250 
    251     if(gifthuntSessionData["icon"] == 99){
    252       // custom icon, check uploaded file
    253       if(customIcon.value == ""){
    254         errorCount++;
    255         toggleIconError("display");
    256       } else {
    257         toggleIconError("hide");
    258         gifthuntSessionData["custom_icon"] = customIcon.value;
    259       }
    260     }
    261   }
    262 
    263   // check fields with logic
    264   const displayType = document.querySelector("input[name='display_type']:checked").value;
    265   if(displayType == "time"){
    266     // check time field
    267     const timeToDisplay = document.querySelector("#time_to_display");
    268     if(!timeToDisplay.value){
    269       errorCount++;
    270       valueCheck(timeToDisplay);
    271       errorMessages.push(timeToDisplay.dataset.gifthuntError);
    272     } else {
    273       gifthuntSessionData["time_to_display"] = timeToDisplay.value;
    274       gifthuntSessionData["display_type"] = "time";
    275     }
    276 
    277     // add default value to pageview field
    278     document.querySelector("#pageview_to_display").value = "5";
    279   } else {
    280     // check pageview field
    281     const pageViewToDisplay = document.querySelector("#pageview_to_display");
    282     if(!pageViewToDisplay.value){
    283       errorCount++;
    284       valueCheck(pageViewToDisplay);
    285       errorMessages.push(pageViewToDisplay.dataset.gifthuntError);
    286     } else {
    287       gifthuntSessionData["pageview_to_display"] = pageViewToDisplay.value;
    288       gifthuntSessionData["display_type"] = "pageview";
    289     }
    290 
    291     // add default value to time field
    292     document.querySelector("#time_to_display").value = "90";
    293   }
    294 
    295   // check gift type
    296   const giftType = document.querySelector("input[name='gift_type']:checked");
    297   if(!giftType){
    298     errorCount++;
    299     toggleGiftTypeError("display");
    300     errorMessages.push(document.querySelector("#gift_type-error-message").textContent);
    301   } else {
    302     toggleGiftTypeError("hide");
    303     gifthuntSessionData["gift_type"] = giftType.value;
    304   }
    305 
    306   // check gifts based on gift type
    307   if(gifthuntSessionData["gift_type"] && gifthuntSessionData["gift_type"] == "oneMany"){
    308     // one gift for everyone
    309     const gift = document.querySelector("#gift");
    310     if(!gift.value){
    311       errorCount++;
    312       valueCheck(gift);
    313       errorMessages.push(gift.dataset.gifthuntError);
    314     } else {
    315       valueCheck(gift);
    316       gifthuntSessionData["gift"] = gift.value;
    317     }
    318   } else {
    319     // multiple gifts
    320     let giftItems = [];
    321     let giftItemsCount = 0;
    322     const giftsError = document.querySelector("#gifts-error-message");
    323 
    324     document.querySelectorAll(".gift-item").forEach(giftItem => {
    325       const currentGiftItem = giftItem.querySelector("input");
    326       if(currentGiftItem.value){
    327         giftItems.push({
    328           value: currentGiftItem.value,
    329           dbid: currentGiftItem.dataset.giftDbId
    330         });
    331 
    332         giftItemsCount++;
    333       }
    334     });
    335 
    336     if(!giftItemsCount){
    337       errorCount++;
    338       errorMessages.push(giftsError.textContent);
    339       giftsError.classList.remove("hidden");
    340     } else {
    341       gifthuntSessionData["gifts"] = giftItems;
    342       giftsError.classList.add("hidden");
    343     }
    344   }
    345 
    346   // checkbox values
    347   const checkboxFields = ["allow_multiple_collect", "form_collect_first_name", "form_collect_last_name", "form_collect_additional_information"];
    348   checkboxFields.forEach(checkboxField => {
    349     gifthuntSessionData[checkboxField] = document.querySelector(`#${checkboxField}`).checked ? 1 : 0;
    350   });
    351 
    352   // check values for selected checkboxes
    353   const checkboxFieldsNames = ["form_collect_first_name", "form_collect_last_name", "form_collect_additional_information"];
    354   checkboxFieldsNames.forEach(checkboxFieldName => {
    355     const currentFieldId = checkboxFieldName.replace('collect', 'label');
    356     const currentField = document.querySelector(`#${currentFieldId}`);
    357    
    358     if(gifthuntSessionData[checkboxFieldName] && !currentField.value){
    359       errorCount++;
    360       valueCheck(currentField);
    361       errorMessages.push(currentField.dataset.gifthuntError);
    362     } else {
    363       gifthuntSessionData[currentFieldId] = currentField.value;
    364       valueCheck(currentField);
    365     }
    366   });
    367 
    368   // check visibility values
    369   const active = document.querySelector("#active");
    370   gifthuntSessionData["active"] = (active.checked) ? 1 : 0;
    371 
    372   if(gifthuntSessionData["active"]){
    373     // check dates
    374     const visibleFrom = document.querySelector("#visible_from");
    375     const visibleTo = document.querySelector("#visible_to");
    376    
    377     valueCheck(visibleFrom);
    378     valueCheck(visibleTo);
    379 
    380     if(visibleFrom.value){
    381       gifthuntSessionData["visible_from"] = visibleFrom.value;
    382     } else {
    383       errorCount++;
    384       errorMessages.push("Session start date is required");
    385     }
    386 
    387     if(visibleTo.value){
    388       gifthuntSessionData["visible_to"] = visibleTo.value;
    389     } else {
    390       errorCount++;
    391       errorMessages.push("Session end date is required");
    392     }
    393   }
    394 
    395   // display validation result
    396   if(errorCount){
    397     const finalErrorMessage = errorMessages.map(errorMessage => `<li> ${errorMessage}</li>`).join('');
    398 
    399     document.querySelectorAll(".gifthunt-form-result--error").forEach(errorSection => {
    400       errorSection.querySelector(".gifthunt-form-result__content").innerHTML = `<ul>${finalErrorMessage}</ul>`;
    401       errorSection.classList.remove("hidden");
    402     });
    403 
    404     document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
    405 
    406     return;
    407   } else {
    408     document.querySelectorAll(".gifthunt-form-result").forEach(formResultSection => {
    409       formResultSection.classList.add("hidden");
    410     });
    411     document.querySelector(".gifthunt-form-result__modal").classList.add("hidden");
    412   }
    413 
    414   // display loading animation and disable button
    415   const gifthuntSaveButtons = document.querySelectorAll(".gifthunt-save-session")
    416   gifthuntSaveButtons.forEach(saveButton => {
    417     saveButton.querySelector("i").classList.remove("hidden");
    418     saveButton.disabled = true;
    419   });
    420  
    421 
    422   let gifthuntAction = "create";
    423   if(giftSessionId){
    424     gifthuntAction = "update";
    425   }
    426 
    427   gifthuntSessionData["id"] = giftSessionId;
    428 
    429   // save or update
    430   const data = {
    431     'nonce': gifthuntFreeNonce,
    432     'action': 'gifthuntfree_action',
    433     gifthuntAction,
    434     gifthuntSessionData
    435   };
    436 
    437   jQuery.post(ajaxurl, data, (response) => {
    438 
    439         if(response.status != "success"){
    440       document.querySelectorAll(".gifthunt-form-result--error").forEach(errorSection => {
    441         errorSection.querySelector(".gifthunt-form-result__content").innerHTML = response.data;
    442         errorSection.classList.remove("hidden");
    443       });
    444       document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
    445     } else {
    446       if(gifthuntAction == "create"){
    447         // redirect to session page
    448         window.location.href = `admin.php?page=gifthuntfree-sessions&p=session-edit&id=${response.data}&msg=created`;
    449         return;
    450       } else {
    451         // display session updated message
    452         document.querySelectorAll(".gifthunt-form-result--success").forEach(successSection => {
    453           successSection.querySelector(".gifthunt-form-result__content").innerHTML = response.data;
    454           successSection.classList.remove("hidden");
    455         });
    456         document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
    457 
    458         // update gifts lists with db IDs
    459         const newGiftsList = response.gifts.map((gift) => {
    460           let currentGift = gift.gift.replace(/"/g, '&quot;');
    461           let giftFieldTemplate = document.querySelector("#gift-field-template").textContent
    462                                     .replace(/%GIFTID%/gi, gift.id)
    463                                     .replace(/%GIFTDBID%/gi, gift.id)
    464                                     .replace(/%GIFTGIFT%/gi, currentGift);
    465          
    466           return giftFieldTemplate;
    467         });
    468         document.querySelector("#gifthunt-card__section--gift-list").innerHTML = newGiftsList.join('');
    469       }
    470     }
    471 
    472     gifthuntSaveButtons.forEach(saveButton => {
    473       saveButton.querySelector("i").classList.add("hidden");
    474       saveButton.disabled = false;
    475     });
     210function checkReadyToSave() {
     211    let gifthuntSessionData = {};
     212    let errorCount = 0;
     213    let errorMessages = [];
     214
     215    // check basic fields
     216    const requiredBasicFields = ["#name", "#popup_title", "#form_label_email", "#form_label_legal", "#form_legal_url", "#popup_button", "#success_email_sender_name", "#success_email_sender_email", "#success_email_subject"];
     217
     218    requiredBasicFields.forEach((requiredField) => {
     219        const currentField = document.querySelector(requiredField);
     220        if (!currentField.value) {
     221            errorCount++;
     222            valueCheck(currentField);
     223            errorMessages.push(currentField.dataset.gifthuntError);
     224        } else {
     225            valueCheck(currentField);
     226        }
     227
     228        gifthuntSessionData[currentField.id] = currentField.value;
     229    });
     230
     231    // check wysiwyg fields
     232    const requiredEditorFields = ["popup_body", "popup_submit_body", "success_email_body"];
     233    requiredEditorFields.forEach((requiredField) => {
     234        let currentValue = "";
     235        if (tinyMCE.editors[requiredField]) {
     236            /**
     237             * Visual editor
     238             */
     239            currentValue = tinyMCE.editors[requiredField].getContent();
     240        } else {
     241            /**
     242             * Text editor
     243             */
     244            currentValue = document.querySelector(`#${requiredField}`).value;
     245        }
     246
     247        gifthuntSessionData[requiredField] = currentValue;
     248
     249        if (currentValue.replace(/<[^>]*>?/gm, "") == "") {
     250            errorCount++;
     251            toggleEditorError(requiredField, "display");
     252            errorMessages.push(document.querySelector(`#${requiredField}-error-message`).textContent);
     253        } else {
     254            toggleEditorError(requiredField, "hide");
     255        }
     256    });
     257
     258    // check session icon
     259    const icon = document.querySelector("input[name='icon']:checked");
     260    const customIcon = document.querySelector("#custom_icon");
     261    if (!icon) {
     262        errorCount++;
     263        toggleIconError("display");
     264        errorMessages.push(document.querySelector("#icon_error-message").textContent);
     265    } else {
     266        toggleIconError("hide");
     267        gifthuntSessionData["icon"] = icon.value;
     268
     269        if (gifthuntSessionData["icon"] == 99) {
     270            // custom icon, check uploaded file
     271            if (customIcon.value == "") {
     272                errorCount++;
     273                toggleIconError("display");
     274            } else {
     275                toggleIconError("hide");
     276                gifthuntSessionData["custom_icon"] = customIcon.value;
     277            }
     278        }
     279    }
     280
     281    // check fields with logic
     282    const displayType = document.querySelector("input[name='display_type']:checked").value;
     283    if (displayType == "time") {
     284        // check time field
     285        const timeToDisplay = document.querySelector("#time_to_display");
     286        if (!timeToDisplay.value) {
     287            errorCount++;
     288            valueCheck(timeToDisplay);
     289            errorMessages.push(timeToDisplay.dataset.gifthuntError);
     290        } else {
     291            gifthuntSessionData["time_to_display"] = timeToDisplay.value;
     292            gifthuntSessionData["display_type"] = "time";
     293        }
     294
     295        // add default value to pageview field
     296        document.querySelector("#pageview_to_display").value = "5";
     297    } else {
     298        // check pageview field
     299        const pageViewToDisplay = document.querySelector("#pageview_to_display");
     300        if (!pageViewToDisplay.value) {
     301            errorCount++;
     302            valueCheck(pageViewToDisplay);
     303            errorMessages.push(pageViewToDisplay.dataset.gifthuntError);
     304        } else {
     305            gifthuntSessionData["pageview_to_display"] = pageViewToDisplay.value;
     306            gifthuntSessionData["display_type"] = "pageview";
     307        }
     308
     309        // add default value to time field
     310        document.querySelector("#time_to_display").value = "90";
     311    }
     312
     313    // check gift type
     314    const giftType = document.querySelector("input[name='gift_type']:checked");
     315    if (!giftType) {
     316        errorCount++;
     317        toggleGiftTypeError("display");
     318        errorMessages.push(document.querySelector("#gift_type-error-message").textContent);
     319    } else {
     320        toggleGiftTypeError("hide");
     321        gifthuntSessionData["gift_type"] = giftType.value;
     322    }
     323
     324    // check gifts based on gift type
     325    if (gifthuntSessionData["gift_type"] && gifthuntSessionData["gift_type"] == "oneMany") {
     326        // one gift for everyone
     327        const gift = document.querySelector("#gift");
     328        if (!gift.value) {
     329            errorCount++;
     330            valueCheck(gift);
     331            errorMessages.push(gift.dataset.gifthuntError);
     332        } else {
     333            valueCheck(gift);
     334            gifthuntSessionData["gift"] = gift.value;
     335        }
     336    } else {
     337        // multiple gifts
     338        let giftItems = [];
     339        let giftItemsCount = 0;
     340        const giftsError = document.querySelector("#gifts-error-message");
     341
     342        document.querySelectorAll(".gift-item").forEach((giftItem) => {
     343            const currentGiftItem = giftItem.querySelector("input");
     344            if (currentGiftItem.value) {
     345                giftItems.push({
     346                    value: currentGiftItem.value,
     347                    dbid: currentGiftItem.dataset.giftDbId,
     348                });
     349
     350                giftItemsCount++;
     351            }
     352        });
     353
     354        if (!giftItemsCount) {
     355            errorCount++;
     356            errorMessages.push(giftsError.textContent);
     357            giftsError.classList.remove("hidden");
     358        } else {
     359            gifthuntSessionData["gifts"] = giftItems;
     360            giftsError.classList.add("hidden");
     361        }
     362    }
     363
     364    // checkbox values
     365    const checkboxFields = ["allow_multiple_collect", "form_collect_first_name", "form_collect_last_name", "form_collect_additional_information", "success_email_send"];
     366    checkboxFields.forEach((checkboxField) => {
     367        gifthuntSessionData[checkboxField] = document.querySelector(`#${checkboxField}`).checked ? 1 : 0;
     368    });
     369
     370    // check values for selected checkboxes
     371    const checkboxFieldsNames = ["form_collect_first_name", "form_collect_last_name", "form_collect_additional_information"];
     372    checkboxFieldsNames.forEach((checkboxFieldName) => {
     373        const currentFieldId = checkboxFieldName.replace("collect", "label");
     374        const currentField = document.querySelector(`#${currentFieldId}`);
     375
     376        if (gifthuntSessionData[checkboxFieldName] && !currentField.value) {
     377            errorCount++;
     378            valueCheck(currentField);
     379            errorMessages.push(currentField.dataset.gifthuntError);
     380        } else {
     381            gifthuntSessionData[currentFieldId] = currentField.value;
     382            valueCheck(currentField);
     383        }
     384    });
     385
     386    // check visibility values
     387    const active = document.querySelector("#active");
     388    gifthuntSessionData["active"] = active.checked ? 1 : 0;
     389
     390    if (gifthuntSessionData["active"]) {
     391        // check dates
     392        const visibleFrom = document.querySelector("#visible_from");
     393        const visibleTo = document.querySelector("#visible_to");
     394
     395        valueCheck(visibleFrom);
     396        valueCheck(visibleTo);
     397
     398        if (visibleFrom.value) {
     399            gifthuntSessionData["visible_from"] = visibleFrom.value;
     400        } else {
     401            errorCount++;
     402            errorMessages.push("Session start date is required");
     403        }
     404
     405        if (visibleTo.value) {
     406            gifthuntSessionData["visible_to"] = visibleTo.value;
     407        } else {
     408            errorCount++;
     409            errorMessages.push("Session end date is required");
     410        }
     411    }
     412
     413    // display validation result
     414    if (errorCount) {
     415        const finalErrorMessage = errorMessages.map((errorMessage) => `<li> ${errorMessage}</li>`).join("");
     416
     417        document.querySelectorAll(".gifthunt-form-result--error").forEach((errorSection) => {
     418            errorSection.querySelector(".gifthunt-form-result__content").innerHTML = `<ul>${finalErrorMessage}</ul>`;
     419            errorSection.classList.remove("hidden");
     420        });
     421
     422        document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
     423
     424        return;
     425    } else {
     426        document.querySelectorAll(".gifthunt-form-result").forEach((formResultSection) => {
     427            formResultSection.classList.add("hidden");
     428        });
     429        document.querySelector(".gifthunt-form-result__modal").classList.add("hidden");
     430    }
     431
     432    // display loading animation and disable button
     433    const gifthuntSaveButtons = document.querySelectorAll(".gifthunt-save-session");
     434    gifthuntSaveButtons.forEach((saveButton) => {
     435        saveButton.querySelector("i").classList.remove("hidden");
     436        saveButton.disabled = true;
     437    });
     438
     439    let gifthuntAction = "create";
     440    if (giftSessionId) {
     441        gifthuntAction = "update";
     442    }
     443
     444    gifthuntSessionData["id"] = giftSessionId;
     445
     446    // save or update
     447    const data = {
     448        nonce: gifthuntFreeNonce,
     449        action: "gifthuntfree_action",
     450        gifthuntAction,
     451        gifthuntSessionData,
     452    };
     453
     454    jQuery.post(ajaxurl, data, (response) => {
     455        if (response.status != "success") {
     456            document.querySelectorAll(".gifthunt-form-result--error").forEach((errorSection) => {
     457                errorSection.querySelector(".gifthunt-form-result__content").innerHTML = response.data;
     458                errorSection.classList.remove("hidden");
     459            });
     460            document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
     461        } else {
     462            if (gifthuntAction == "create") {
     463                // redirect to session page
     464                window.location.href = `admin.php?page=gifthuntfree-sessions&p=session-edit&id=${response.data}&msg=created`;
     465                return;
     466            } else {
     467                // display session updated message
     468                document.querySelectorAll(".gifthunt-form-result--success").forEach((successSection) => {
     469                    successSection.querySelector(".gifthunt-form-result__content").innerHTML = response.data;
     470                    successSection.classList.remove("hidden");
     471                });
     472                document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
     473
     474                // update gifts lists with db IDs
     475                const newGiftsList = response.gifts.map((gift) => {
     476                    let currentGift = gift.gift.replace(/"/g, "&quot;");
     477                    let giftFieldTemplate = document
     478                        .querySelector("#gift-field-template")
     479                        .textContent.replace(/%GIFTID%/gi, gift.id)
     480                        .replace(/%GIFTDBID%/gi, gift.id)
     481                        .replace(/%GIFTGIFT%/gi, currentGift);
     482
     483                    return giftFieldTemplate;
     484                });
     485                document.querySelector("#gifthunt-card__section--gift-list").innerHTML = newGiftsList.join("");
     486            }
     487        }
     488
     489        gifthuntSaveButtons.forEach((saveButton) => {
     490            saveButton.querySelector("i").classList.add("hidden");
     491            saveButton.disabled = false;
     492        });
    476493    });
    477494}
     
    480497 * Handle form submit
    481498 */
    482 document.querySelectorAll(".gifthunt-save-session").forEach(saveButton => {
    483   saveButton.addEventListener("click", (e) => {
    484     e.preventDefault();
    485     checkReadyToSave();
    486   });
    487 });
    488 
    489 document.querySelectorAll(".gifthunt-input-field").forEach(gifthuntInputField => {
    490   gifthuntInputField.addEventListener("blur", (e) => {
    491     if(e.target.value && e.target.classList.contains("gifthunt-field-error")){
    492       e.target.classList.remove("gifthunt-field-error");
    493       e.target.parentNode.querySelector(".gifthunt-error-message").classList.add("hidden");
    494     }
    495   });
     499document.querySelectorAll(".gifthunt-save-session").forEach((saveButton) => {
     500    saveButton.addEventListener("click", (e) => {
     501        e.preventDefault();
     502        checkReadyToSave();
     503    });
     504});
     505
     506document.querySelectorAll(".gifthunt-input-field").forEach((gifthuntInputField) => {
     507    gifthuntInputField.addEventListener("blur", (e) => {
     508        if (e.target.value && e.target.classList.contains("gifthunt-field-error")) {
     509            e.target.classList.remove("gifthunt-field-error");
     510            e.target.parentNode.querySelector(".gifthunt-error-message").classList.add("hidden");
     511        }
     512    });
    496513});
    497514
     
    500517 */
    501518document.addEventListener("DOMContentLoaded", () => {
    502   const giftType = document.querySelector("input[name='gift_type']:checked");
    503   if(giftType && giftType.value == "oneMany"){
    504     // one gift for everyone
    505     const gift = document.querySelector("#gift");
    506     if(!gift.value){
    507       valueCheck(gift);
    508     } else {
    509       valueCheck(gift);
    510     }
    511   } else {
    512     // multiple gifts
    513     let giftItems = [];
    514     let giftItemsCount = 0;
    515     const giftsError = document.querySelector("#gifts-error-message");
    516  
    517     document.querySelectorAll(".gift-item").forEach(giftItem => {
    518       const currentGiftItem = giftItem.querySelector("input");
    519       if(currentGiftItem.value){
    520         giftItemsCount++;
    521       }
    522     });
    523  
    524     if(!giftItemsCount){
    525       giftsError.classList.remove("hidden");
    526     } else {
    527       giftsError.classList.add("hidden");
    528     }
    529   }
     519    const giftType = document.querySelector("input[name='gift_type']:checked");
     520    if (giftType && giftType.value == "oneMany") {
     521        // one gift for everyone
     522        const gift = document.querySelector("#gift");
     523        if (!gift.value) {
     524            valueCheck(gift);
     525        } else {
     526            valueCheck(gift);
     527        }
     528    } else {
     529        // multiple gifts
     530        let giftItems = [];
     531        let giftItemsCount = 0;
     532        const giftsError = document.querySelector("#gifts-error-message");
     533
     534        document.querySelectorAll(".gift-item").forEach((giftItem) => {
     535            const currentGiftItem = giftItem.querySelector("input");
     536            if (currentGiftItem.value) {
     537                giftItemsCount++;
     538            }
     539        });
     540
     541        if (!giftItemsCount) {
     542            giftsError.classList.remove("hidden");
     543        } else {
     544            giftsError.classList.add("hidden");
     545        }
     546    }
    530547});
    531548
     
    533550 * Close modal
    534551 */
    535 document.querySelectorAll(".gifthunt-form-result__close-button").forEach(closeButton => {
    536   closeButton.addEventListener("click", () => {
    537     document.querySelectorAll(".gifthunt-form-result__modal").forEach(gifthuntModal => {
    538       gifthuntModal.classList.add("hidden");
    539     });
    540   });
     552document.querySelectorAll(".gifthunt-form-result__close-button").forEach((closeButton) => {
     553    closeButton.addEventListener("click", () => {
     554        document.querySelectorAll(".gifthunt-form-result__modal").forEach((gifthuntModal) => {
     555            gifthuntModal.classList.add("hidden");
     556        });
     557    });
    541558});
    542559
     
    544561 * Delete session
    545562 */
    546 if(giftSessionId > 0){
    547   document.querySelector("#button--session-delete").addEventListener("click", () => {
    548     document.querySelector(".gifthunt-form__delete-confirm-modal").classList.remove("hidden");
    549   });
    550 }
    551 
     563if (giftSessionId > 0) {
     564    document.querySelector("#button--session-delete").addEventListener("click", () => {
     565        document.querySelector(".gifthunt-form__delete-confirm-modal").classList.remove("hidden");
     566    });
     567}
    552568
    553569// cancel delete
    554570document.querySelector("#button--cancel-delete").addEventListener("click", () => {
    555   document.querySelector(".gifthunt-form__delete-confirm-modal").classList.add("hidden");
     571    document.querySelector(".gifthunt-form__delete-confirm-modal").classList.add("hidden");
    556572});
    557573
    558574document.querySelector(".gifthunt-form__delete-confirm-modal__close-button").addEventListener("click", () => {
    559   document.querySelector(".gifthunt-form__delete-confirm-modal").classList.add("hidden");
     575    document.querySelector(".gifthunt-form__delete-confirm-modal").classList.add("hidden");
    560576});
    561577
    562578// confirm delete
    563579document.querySelector("#button--confirm-delete").addEventListener("click", (event) => {
    564   event.target.querySelector("i").classList.remove("hidden");
    565   event.target.disabled = true;
    566 
    567   let gifthuntAction = "delete";
    568   const data = {
    569     'nonce': gifthuntFreeNonce,
    570     'action': 'gifthuntfree_action',
    571     gifthuntAction,
    572     "id": giftSessionId
    573   };
    574 
    575   jQuery.post(ajaxurl, data, (response) => {
    576     event.target.querySelector("i").classList.add("hidden");
    577     event.target.disabled = false;
    578     document.querySelector(".gifthunt-form__delete-confirm-modal").classList.add("hidden");
    579 
    580         if(response.status != "success"){
    581       document.querySelectorAll(".gifthunt-form-result--error").forEach(errorSection => {
    582         errorSection.querySelector(".gifthunt-form-result__content").innerHTML = response.data;
    583         errorSection.classList.remove("hidden");
    584       });
    585       document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
    586     } else {
    587       // redirect to session list
    588       window.location.href = `admin.php?page=gifthuntfree-sessions&msg=deleted`;
    589       return;
    590     }
     580    event.target.querySelector("i").classList.remove("hidden");
     581    event.target.disabled = true;
     582
     583    let gifthuntAction = "delete";
     584    const data = {
     585        nonce: gifthuntFreeNonce,
     586        action: "gifthuntfree_action",
     587        gifthuntAction,
     588        id: giftSessionId,
     589    };
     590
     591    jQuery.post(ajaxurl, data, (response) => {
     592        event.target.querySelector("i").classList.add("hidden");
     593        event.target.disabled = false;
     594        document.querySelector(".gifthunt-form__delete-confirm-modal").classList.add("hidden");
     595
     596        if (response.status != "success") {
     597            document.querySelectorAll(".gifthunt-form-result--error").forEach((errorSection) => {
     598                errorSection.querySelector(".gifthunt-form-result__content").innerHTML = response.data;
     599                errorSection.classList.remove("hidden");
     600            });
     601            document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
     602        } else {
     603            // redirect to session list
     604            window.location.href = `admin.php?page=gifthuntfree-sessions&msg=deleted`;
     605            return;
     606        }
    591607    });
    592608});
     
    596612 */
    597613document.querySelector("#gifthunt-send-test-success-email").addEventListener("click", () => {
    598   document.querySelector(".gifthunt-form__test-mail-modal").classList.remove("hidden");
    599 });
    600 
    601 document.querySelector("#button--cancel-send-testmail").addEventListener("click", () => {
    602   document.querySelector(".gifthunt-form__test-mail-modal").classList.add("hidden");
    603 });
    604 
    605 document.querySelector(".gifthunt-form__test-mail-modal__close-button").addEventListener("click", () => {
    606   document.querySelector(".gifthunt-form__test-mail-modal").classList.add("hidden");
     614    document.querySelector(".gifthunt-form__test-mail-modal").classList.remove("hidden");
     615});
     616
     617document.querySelector("#button--cancel-send-testmail").addEventListener("click", () => {
     618    document.querySelector(".gifthunt-form__test-mail-modal").classList.add("hidden");
     619});
     620
     621document.querySelector(".gifthunt-form__test-mail-modal__close-button").addEventListener("click", () => {
     622    document.querySelector(".gifthunt-form__test-mail-modal").classList.add("hidden");
    607623});
    608624
    609625document.querySelector("#button--confirm-send-testmail").addEventListener("click", (event) => {
    610   /**
    611    * Check email format
    612    */
    613   const toMail = document.querySelector("#to").value;
    614   if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(toMail)) {
    615     document.querySelector("#to").focus();
    616     alert("Please, use a valid email address");
    617     return;
    618   }
    619 
    620   event.target.disabled = true;
    621   event.target.querySelector("i").classList.remove("hidden");
    622 
    623   let gifthuntAction = "send_test_mail";
    624   const data = {
    625     'nonce': gifthuntFreeNonce,
    626     'action': 'gifthuntfree_action',
    627     gifthuntAction,
    628     "to": toMail,
    629     "success_email_sender_name": document.querySelector("#success_email_sender_name").value,
    630     "success_email_sender_email": document.querySelector("#success_email_sender_email").value,
    631     "success_email_subject": document.querySelector("#success_email_subject").value,
    632     "success_email_body": tinyMCE.editors["success_email_body"].getContent()
    633   };
    634 
    635   jQuery.post(ajaxurl, data, (response) => {
    636     event.target.querySelector("i").classList.add("hidden");
    637     event.target.disabled = false;
    638     document.querySelector(".gifthunt-form__test-mail-modal").classList.add("hidden");
    639 
    640         if(response.status != "success"){
    641       document.querySelectorAll(".gifthunt-form-result--error").forEach(errorSection => {
    642         errorSection.querySelector(".gifthunt-form-result__content").innerHTML = response.data;
    643         errorSection.classList.remove("hidden");
    644       });
    645       document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
    646     } else {
    647       document.querySelectorAll(".gifthunt-form-result--success").forEach(successSection => {
    648         successSection.querySelector(".gifthunt-form-result__content").innerHTML = response.data;
    649         successSection.classList.remove("hidden");
    650       });
    651       document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
    652     }
    653     });
    654 
    655 
     626    /**
     627     * Check email format
     628     */
     629    const toMail = document.querySelector("#to").value;
     630    if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(toMail)) {
     631        document.querySelector("#to").focus();
     632        alert("Please, use a valid email address");
     633        return;
     634    }
     635
     636    event.target.disabled = true;
     637    event.target.querySelector("i").classList.remove("hidden");
     638
     639    let gifthuntAction = "send_test_mail";
     640    const data = {
     641        nonce: gifthuntFreeNonce,
     642        action: "gifthuntfree_action",
     643        gifthuntAction,
     644        to: toMail,
     645        success_email_sender_name: document.querySelector("#success_email_sender_name").value,
     646        success_email_sender_email: document.querySelector("#success_email_sender_email").value,
     647        success_email_subject: document.querySelector("#success_email_subject").value,
     648        success_email_body: tinyMCE.editors["success_email_body"].getContent(),
     649    };
     650
     651    jQuery.post(ajaxurl, data, (response) => {
     652        event.target.querySelector("i").classList.add("hidden");
     653        event.target.disabled = false;
     654        document.querySelector(".gifthunt-form__test-mail-modal").classList.add("hidden");
     655
     656        if (response.status != "success") {
     657            document.querySelectorAll(".gifthunt-form-result--error").forEach((errorSection) => {
     658                errorSection.querySelector(".gifthunt-form-result__content").innerHTML = response.data;
     659                errorSection.classList.remove("hidden");
     660            });
     661            document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
     662        } else {
     663            document.querySelectorAll(".gifthunt-form-result--success").forEach((successSection) => {
     664                successSection.querySelector(".gifthunt-form-result__content").innerHTML = response.data;
     665                successSection.classList.remove("hidden");
     666            });
     667            document.querySelector(".gifthunt-form-result__modal").classList.remove("hidden");
     668        }
     669    });
    656670});
    657671
     
    660674 */
    661675const accordionTitle = document.querySelectorAll(".gifthunt-accordion__title");
    662 if(accordionTitle.length){
    663   accordionTitle.forEach(title => {
    664     title.addEventListener("click", () => toggleAccordion(title));
    665   });
    666 }
    667 
    668 function toggleAccordion(title){
    669   const accordionSection = title.parentNode;
    670   const accordion = accordionSection.parentNode;
    671  
    672   if(accordionSection.classList.contains("gifthunt-accordion__section--active")){
    673     // this is the active section, don't do anything
    674     return;
    675   }
    676 
    677   const activeAccordionSection = accordion.querySelector(".gifthunt-accordion__section--active");
    678   if(activeAccordionSection){
    679     activeAccordionSection.classList.remove("gifthunt-accordion__section--active");
    680   }
    681 
    682   accordionSection.classList.add("gifthunt-accordion__section--active");
    683 
    684   return;
     676if (accordionTitle.length) {
     677    accordionTitle.forEach((title) => {
     678        title.addEventListener("click", () => toggleAccordion(title));
     679    });
     680}
     681
     682function toggleAccordion(title) {
     683    const accordionSection = title.parentNode;
     684    const accordion = accordionSection.parentNode;
     685
     686    if (accordionSection.classList.contains("gifthunt-accordion__section--active")) {
     687        // this is the active section, don't do anything
     688        return;
     689    }
     690
     691    const activeAccordionSection = accordion.querySelector(".gifthunt-accordion__section--active");
     692    if (activeAccordionSection) {
     693        activeAccordionSection.classList.remove("gifthunt-accordion__section--active");
     694    }
     695
     696    accordionSection.classList.add("gifthunt-accordion__section--active");
     697
     698    return;
    685699}
    686700
    687701const gifthuntCustomIconUploadButton = document.querySelector("#gifthunt__icon-upload-button");
    688 if(gifthuntCustomIconUploadButton){
    689   let gifthuntCustomIconUploader;
    690 
    691   gifthuntCustomIconUploadButton.addEventListener("click", (e) => {
    692     e.preventDefault();
    693 
    694     gifthuntCustomIconUploader ? gifthuntCustomIconUploader.open() : (
    695       (gifthuntCustomIconUploader = wp.media.frames.gifthuntCustomIconUploader = wp.media({
    696         title: 'Select custom icon',
    697         button: {
    698           text: 'Use this custom icon'
    699         },
    700         multiple: !1
    701       })).on('select', function () {
    702         attachment = gifthuntCustomIconUploader.state().get("selection").first().toJSON();
    703         document.querySelector("#custom_icon").value = attachment.url;
    704         document.querySelector("#gifthunt__icon-upload-preview img").src = attachment.url;
    705         document.querySelector("#gifthunt__icon-upload-preview label").style.display = "block";
    706         document.querySelector("#gifthunt__icon-upload-preview input[type='radio']").checked = true;
    707       }), gifthuntCustomIconUploader.open());
    708   });
     702if (gifthuntCustomIconUploadButton) {
     703    let gifthuntCustomIconUploader;
     704
     705    gifthuntCustomIconUploadButton.addEventListener("click", (e) => {
     706        e.preventDefault();
     707
     708        gifthuntCustomIconUploader
     709            ? gifthuntCustomIconUploader.open()
     710            : ((gifthuntCustomIconUploader = wp.media.frames.gifthuntCustomIconUploader = wp.media({
     711                    title: "Select custom icon",
     712                    button: {
     713                        text: "Use this custom icon",
     714                    },
     715                    multiple: !1,
     716              })).on("select", function () {
     717                    attachment = gifthuntCustomIconUploader.state().get("selection").first().toJSON();
     718                    document.querySelector("#custom_icon").value = attachment.url;
     719                    document.querySelector("#gifthunt__icon-upload-preview img").src = attachment.url;
     720                    document.querySelector("#gifthunt__icon-upload-preview label").style.display = "block";
     721                    document.querySelector("#gifthunt__icon-upload-preview input[type='radio']").checked = true;
     722              }),
     723              gifthuntCustomIconUploader.open());
     724    });
    709725}
    710726
    711727// remove success parameter from URL (to avoid display the success message after refresh)
    712728let currentLocation = window.top.location.href;
    713 if(currentLocation.includes("msg=created")){
    714   window.history.pushState("gifthuntcreated", "", currentLocation.replace("msg=created", ""));
     729if (currentLocation.includes("msg=created")) {
     730    window.history.pushState("gifthuntcreated", "", currentLocation.replace("msg=created", ""));
    715731}
    716732
    717733// icon animation preview
    718734const iconAnimationPreviewItems = document.querySelectorAll("#gifthunt__icon-animation-list label");
    719 if(iconAnimationPreviewItems){
    720   iconAnimationPreviewItems.forEach(iconAnimationPreview => {
    721     iconAnimationPreview.addEventListener("mouseover", () => {
    722       toggleAnimationPreview("mouseover", iconAnimationPreview);
    723     });
    724 
    725     iconAnimationPreview.addEventListener("mouseleave", () => {
    726       toggleAnimationPreview("mouseleave", iconAnimationPreview);
    727     });
    728   });
    729 }
    730 
    731 function toggleAnimationPreview(event, iconAnimationItem){
    732   const animationPreviewSpan = iconAnimationItem.querySelector(".gifthunt-icon-animation-preview");
    733   const animationClass = animationPreviewSpan.dataset.animation;
    734   if(event == "mouseover"){
    735     animationPreviewSpan.querySelector("span").classList.add(animationClass);
    736   } else {
    737     animationPreviewSpan.querySelector("span").classList.remove(animationClass);
    738   }
     735if (iconAnimationPreviewItems) {
     736    iconAnimationPreviewItems.forEach((iconAnimationPreview) => {
     737        iconAnimationPreview.addEventListener("mouseover", () => {
     738            toggleAnimationPreview("mouseover", iconAnimationPreview);
     739        });
     740
     741        iconAnimationPreview.addEventListener("mouseleave", () => {
     742            toggleAnimationPreview("mouseleave", iconAnimationPreview);
     743        });
     744    });
     745}
     746
     747function toggleAnimationPreview(event, iconAnimationItem) {
     748    const animationPreviewSpan = iconAnimationItem.querySelector(".gifthunt-icon-animation-preview");
     749    const animationClass = animationPreviewSpan.dataset.animation;
     750    if (event == "mouseover") {
     751        animationPreviewSpan.querySelector("span").classList.add(animationClass);
     752    } else {
     753        animationPreviewSpan.querySelector("span").classList.remove(animationClass);
     754    }
    739755}
    740756
    741757// gifthunt session from accordion
    742758const gifthuntFormAccordionLabels = document.querySelectorAll(".gifthunt-form-group__label--accordion");
    743 if(gifthuntFormAccordionLabels){
    744   gifthuntFormAccordionLabels.forEach(gifthuntFormAccordionLabel => {
    745     gifthuntFormAccordionLabel.addEventListener("click", toggleFormSectionBody);
    746   })
    747 }
    748 
    749 function toggleFormSectionBody(){
    750   const section = this.closest(".gifthunt-card__section");
    751   if(section.classList.contains("gifthunt-card__section--closed")){
    752     section.classList.remove("gifthunt-card__section--closed");
    753     section.classList.add("gifthunt-card__section--opened");
    754   } else {
    755     section.classList.remove("gifthunt-card__section--opened");
    756     section.classList.add("gifthunt-card__section--closed");
    757   }
    758 }
     759if (gifthuntFormAccordionLabels) {
     760    gifthuntFormAccordionLabels.forEach((gifthuntFormAccordionLabel) => {
     761        gifthuntFormAccordionLabel.addEventListener("click", toggleFormSectionBody);
     762    });
     763}
     764
     765function toggleFormSectionBody() {
     766    const section = this.closest(".gifthunt-card__section");
     767    if (section.classList.contains("gifthunt-card__section--closed")) {
     768        section.classList.remove("gifthunt-card__section--closed");
     769        section.classList.add("gifthunt-card__section--opened");
     770    } else {
     771        section.classList.remove("gifthunt-card__section--opened");
     772        section.classList.add("gifthunt-card__section--closed");
     773    }
     774}
  • gift-hunt/tags/1.0.3/classes/class-gifthuntfree.php

    r2330816 r2409806  
    4343  public $form_label_legal = "I have read and agree to the Privacy Policy and Terms of Service";
    4444  public $form_legal_url;
     45  public $success_email_send = 1;
    4546  public $success_email_sender_name;
    4647  public $success_email_sender_email;
     
    122123      form_label_legal varchar(250) NOT NULL ,
    123124      form_legal_url varchar(250) NOT NULL ,
     125      success_email_send boolean NOT NULL DEFAULT 1 ,
    124126      success_email_sender_name varchar(100) NOT NULL ,
    125127      success_email_sender_email varchar(100) NOT NULL ,
     
    354356      "form_label_legal"                    => sanitize_text_field( $_POST["gifthuntSessionData"]["form_label_legal"] ),
    355357      "form_legal_url"                      => esc_url( $_POST["gifthuntSessionData"]["form_legal_url"] ),
     358      "success_email_send"                  => intval( $_POST["gifthuntSessionData"]["success_email_send"] ),
    356359      "success_email_sender_name"           => sanitize_text_field( $_POST["gifthuntSessionData"]["success_email_sender_name"] ),
    357360      "success_email_sender_email"          => sanitize_email( $_POST["gifthuntSessionData"]["success_email_sender_email"] ),
     
    936939    }
    937940
    938     // send mail to hunter
    939     $to = sanitize_email( $_POST["email"] );
    940     $from_name = stripslashes_deep( $gifthunt_data->success_email_sender_name );
    941     $from_email = stripslashes_deep( $gifthunt_data->success_email_sender_email );
    942 
    943     // replace placeholders with collected information
    944     $subject = str_replace(
    945                 array( "%firstname%", "%lastname%", "%email%", "%gift%" ) ,
    946                 array( sanitize_text_field( $_POST["firstName"] ), sanitize_text_field( $_POST["lastName"] ), sanitize_email( $_POST["email"] ), stripslashes_deep( $collected_gift["gift"] ) ),
    947                 stripslashes_deep( $gifthunt_data->success_email_subject )
    948               );
    949 
    950     $message = str_replace(
    951                 array( "%firstname%", "%lastname%", "%email%", "%gift%" ) ,
    952                 array( $hunter_data["firstName"], $hunter_data["lastName"], $hunter_data["email"], stripslashes_deep( $collected_gift["gift"] ) ),
    953                 stripslashes_deep( $gifthunt_data->success_email_body )
    954               );
    955 
    956     // send the final mail to hunter
    957     $mail_result = wp_mail( $to, $subject, $message, "From: " . $from_name . " <" . $from_email . ">\r\nContent-Type: text/html; charset=UTF-8" );
     941    if( $gifthunt_data->success_email_send == 1 ){
     942      // send mail to hunter
     943      $to = sanitize_email( $_POST["email"] );
     944      $from_name = stripslashes_deep( $gifthunt_data->success_email_sender_name );
     945      $from_email = stripslashes_deep( $gifthunt_data->success_email_sender_email );
     946
     947      // replace placeholders with collected information
     948      $subject = str_replace(
     949                  array( "%firstname%", "%lastname%", "%email%", "%gift%" ) ,
     950                  array( sanitize_text_field( $_POST["firstName"] ), sanitize_text_field( $_POST["lastName"] ), sanitize_email( $_POST["email"] ), stripslashes_deep( $collected_gift["gift"] ) ),
     951                  stripslashes_deep( $gifthunt_data->success_email_subject )
     952                );
     953
     954      $message = str_replace(
     955                  array( "%firstname%", "%lastname%", "%email%", "%gift%" ) ,
     956                  array( $hunter_data["firstName"], $hunter_data["lastName"], $hunter_data["email"], stripslashes_deep( $collected_gift["gift"] ) ),
     957                  stripslashes_deep( $gifthunt_data->success_email_body )
     958                );
     959
     960      // send the final mail to hunter
     961      $mail_result = wp_mail( $to, $subject, $message, "From: " . $from_name . " <" . $from_email . ">\r\nContent-Type: text/html; charset=UTF-8" );
     962    }
    958963
    959964    // send back gift to frontend
  • gift-hunt/tags/1.0.3/gifthuntfree.php

    r2330816 r2409806  
    44 * Plugin URI:        https://gifthuntplugin.com
    55 * Description:       Online treasure hunt on your WordPress site
    6  * Version:           1.0.2
     6 * Version:           1.0.3
    77 * Author:            Ferenc Forgacs - @feriforgacs
    88 * Author URI:        https://feriforgacs.me
     
    2020define( "GIFTHUNTFREE_FRONTEND_ENDPOINT", admin_url( "admin-ajax.php" ) );
    2121define( "GIFTHUNTFREE_FRONTEND_ASSETS_FOLDER", plugins_url( "assets/", __FILE__ ) );
    22 define( "GIFTHUNTFREE_VERSION", "1.0.2" );
     22define( "GIFTHUNTFREE_VERSION", "1.0.3" );
    2323
    2424include "classes/class-gifthuntfree.php";
  • gift-hunt/tags/1.0.3/readme.txt

    r2331077 r2409806  
    99Donate link: https://www.paypal.me/feriforgacs/5usd
    1010Requires at least: 4.1
    11 Tested up to: 5.4.2
    12 Stable tag: 1.0.2
    13 Version: 1.0.2
     11Tested up to: 5.5.2
     12Stable tag: 1.0.3
     13Version: 1.0.3
    1414Requires PHP: 5.6.20
    1515Text Domain: gifthuntfree
     
    207207== Changelog ==
    208208
     209= 1.0.3 =
     210* Ability to disable sending a success email
     211
    209212= 1.0.2 =
    210213* Bug fix: Can't save session when there are no changes
  • gift-hunt/tags/1.0.3/views/gifthunt-session-form.view.php

    r2330816 r2409806  
    481481        <div class="gifthunt-card">
    482482            <div class="gifthunt-card__section">
     483                <div class="gifthunt-card__title">
     484                    <div class="gifthunt-card__title">
     485                        <h3>Success Email</h3>
     486                        <div class="gifthunt-form-group">
     487                            <label>
     488                                <input type="checkbox" name="success_email_send" id="success_email_send" value="1" <?php
     489                                if ( $gifthuntfree->success_email_send ) {
     490                                    echo "checked";
     491                                }
     492                                ?> /> Send an email to users after they filled the data collection form.
     493                            </label>
     494                            <p class="gifthunt-form-group__help-text">Choose this option, if you'd like to send an email to the visitors who found the gift and filled the data collection form. You can use this email to send additional information to the users.</p>
     495                        </div>
     496                    </div>
     497                </div>
     498            </div>
     499
     500            <div class="gifthunt-card__section success-email-section <?php
     501            if( ! $gifthuntfree->success_email_send ){
     502                echo "hidden";
     503            }
     504            ?>">
    483505                <div class="gifthunt-card__title">
    484506                    <h3>Success email options</h3>
     
    512534            </div>
    513535
    514             <div class="gifthunt-card__section">
     536            <div class="gifthunt-card__section success-email-section <?php
     537            if( ! $gifthuntfree->success_email_send ){
     538                echo "hidden";
     539            }
     540            ?>">
    515541                <div class="gifthunt-card__columns">
    516542                    <div class="gifthunt-card__column">
     
    532558            </div>
    533559
    534             <div class="gifthunt-card__section">
     560            <div class="gifthunt-card__section success-email-section <?php
     561            if( ! $gifthuntfree->success_email_send ){
     562                echo "hidden";
     563            }
     564            ?>">
    535565                <div class="gifthunt-form-group">
    536566                    <label for="success_email_subject" class="gifthunt-form-group__label">Success email subject</label>
     
    540570            </div>
    541571
    542             <div class="gifthunt-card__section">
     572            <div class="gifthunt-card__section success-email-section <?php
     573            if( ! $gifthuntfree->success_email_send ){
     574                echo "hidden";
     575            }
     576            ?>">
    543577                <div class="gifthunt-form-group">
    544578                    <label for="success_email_body" class="gifthunt-form-group__label">Success email body</label>
     
    553587            </div>
    554588
    555             <div class="gifthunt-card__section">
     589            <div class="gifthunt-card__section success-email-section <?php
     590            if( ! $gifthuntfree->success_email_send ){
     591                echo "hidden";
     592            }
     593            ?>">
    556594                <div class="gifthunt-form-group">
    557595                    <button type="button" class="button" id="gifthunt-send-test-success-email">Send a test email</button>
Note: See TracChangeset for help on using the changeset viewer.